How on earth does this solve the poster's problem? More importantly it's 
relying on private API, so is very brittle.

On 8 May 2010, at 21:04, Waqar Malik wrote:

> Try  NSClassFromString(@"NSCFString");
> 
> --Waqar
> 
> Sent from my iPad
> 
> On May 8, 2010, at 12:51 PM, Kevin Callahan <kc...@mac.com> wrote:
> 
>> isKindOfClass: is an instance method and doesn't work on a class you get 
>> from NSClassFromString(). 
>> 
>> Apple docs: Returns a Boolean value that indicates whether the receiver is 
>> an instance of given class or an instance of any class that inherits from 
>> that class.
>> 
>> for example, you can't do this:
>> 
>> Class classFromString = NSClassFromString(string);
>> 
>> [classFromString isKindOfClass:[SomeClass class]];
>> 
>> I don't want to instantiate classFromString in order to check if it's a 
>> subclass of SomeClass.
>> 
>> What's the best way to check for class inheritance without instantiating?
>> 
>> Thanks
>> Kevin
>> 
>> _______________________________________________
>> 
>> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
>> 
>> 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/wmalloc%40gmail.com
>> 
>> This email sent to wmal...@gmail.com
> _______________________________________________
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> 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/cocoadev%40mikeabdullah.net
> 
> This email sent to cocoa...@mikeabdullah.net

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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 arch...@mail-archive.com

Reply via email to