Re: Obtaining an array of the names of the attributes and relations of a class
Re: Obtaining an array of the names of the attributes and relations of a class
- Subject: Re: Obtaining an array of the names of the attributes and relations of a class
- From: Francis Derive <email@hidden>
- Date: Mon, 21 Nov 2005 22:32:56 +0100
On Nov 21, 2005, at 6:40 PM, Scott Anguish wrote:
I think you needed to read a bit further down on the page...
NSScriptClassDescription is the only concrete subclass of
NSClassDescription provided in Cocoa. It encapsulates an
application’s scripting information.
So it's only useable with AppleScripting. If you don't define an
applescript dictionary, I don't think you'll get anything out of it.
On Nov 21, 2005, at 10:23 AM, Francis Derive wrote:
Also, I can read in the Key-Value Coding Programming Guide, page
39, that "For example the 'attributes' method return the list of
all attributes defined for a class", but this method belongs to
the class NSMetaDataItem, which is another worry to get !
I continue searching for the light, but wouldn't wonder if anyone
here could give me the light.
Scott,
I did read it, didn't understand, and now I am left with an ignorance
worse than before.
I don't yet understand wether or not I can hope for getting an
NSString array of the names of a class's properties( attributes and
relations names ).
This is quite a general question - nothing so specific, that anybody
could ask for ?
Well, I get an NSDescription from any NSObject with the -
classDescription method, and I will check for another way.
After that, what else could I do than to
registerClassDescription:<the previousDescription>.
Because I see that what NSClassDescription first does is only but to
read for a specific class description from the NSClassDescription cache.
Not very clever yet to read what has been written.
When it comes to be useful, I should "override" - say -attributeKeys
method - by a subclass that in this case would return an array of
NSStrings containing the names of immutable values that instances of
this class - NSClassDescription I guess, may be the
NSClassDescription subclass itself - contain.
But it seems the NSDescription object returned by -classDescription
doesn't contain any name of any immutable values : (null).
So how to have a NSClassDescription subclass embed these immutable
values - property names I guess -, by which a class can be described ?
Very promising, but feel abandoned and lost in a no-man's land.
Take it easy with my ignorance.
Francis. _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden