On Sat, May 8, 2010 at 5:14 PM, Sherm Pendley <[email protected]> wrote:
> On Sat, May 8, 2010 at 3:51 PM, Kevin Callahan <[email protected]> wrote:
>> isKindOfClass: is an instance method and doesn't work on a class you get 
>> from NSClassFromString().
>
> Because NSObject is a root class (i.e. it has no superclass), you
> *can* send its -isKindOfClass: message to a Class object. Instance
> methods that belong to a root class are special that way.

You can send it, but it probably doesn't do what you want. E.g.
[NSString isKindOfClass:[NSString class]] will return NO, because the
NSString class object is not an instance of NSString. I'd say this
probably qualifies as "doesn't work", even though it doesn't crash or
anything.

Mike
_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to