gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSObject extension


From: Ewoud Kappers
Subject: NSObject extension
Date: Sat, 19 May 2007 13:13:05 +0200
User-agent: GNUMail (Version 1.2.0)

Dear all,

I am not sure if you remember me, but I was that new blonde guy at
Fosdem.
I showed a demo app to Nicola and Quentin. This demo used
this extension which I named "InstanceEnumeration"
I've been quite busy the last months, but finally now managed to
complete it.
Ok what does it do?
It is an extension of the NSObject root class. (But can be used to
extend any other superclass)

In my first encounter with the *step/cocoa frameworks I had much
trouble getting objects to initiate communication. Although it was
easy for one object to know about the others, the other way around
was not always that clear. Problems with this increased when I started
to use more than one gorm/nib file. Although there are solutions to these
problems, they lack the simplicity and elegance
I tried to incorporate in this (root) class-extension.

What this class-extension does is create an class-based array that
contains pointers to all instances of a class.
And all classes have their own array. This is the most effective and
logical distribution of this information.
Calling classobject has always been easy. Just call it by its
defined name. For example: "[NSObject contact];"
Calling the classobject with various new methods like "firstInstance",
"lastInstance", "instanceWithTag", "instanceWithIndex"
returns the called instance. This is new, and very effective.

If you are interested, please let me know, I can provide you a link.

It is not intended to be part of GNUstep, (although I have no objections)
But it may be of use to you.


Ewoud Kappers





reply via email to

[Prev in Thread] Current Thread [Next in Thread]