Key value binding to "class" of object
Key value binding to "class" of object
- Subject: Key value binding to "class" of object
- From: Daniel Jalkut <email@hidden>
- Date: Thu, 27 Apr 2006 13:38:49 -0400
In an application I'm working on, it is very useful for me to bind to
the class object of a given instance object. I thought I could use a
binding with a keypath like:
myObject.class
But this generates a runtime error complaining that the object is not
key-value compliant for the key 'class'.
I worked around the problem by defining my own method "objectClass"
that simply returns [self class].
Is there some reason why it's a bad idea for the object's class to be
exposed as a keyed value, or is this just an oversight?
Thanks for the hints,
Daniel
_______________________________________________
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