How to check if a class derives from another?

2009-10-05 Thread Rick Mann
I have a need to tell if a class I'm loading dynamically is derived from another class. How do I do this? TIA, Rick ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact

Re: How to check if a class derives from another?

2009-10-05 Thread Jens Alfke
On Oct 5, 2009, at 6:35 PM, Rick Mann wrote: I have a need to tell if a class I'm loading dynamically is derived from another class. How do I do this? Class justLoadedClass = ... ; if ([justLoadedClass isSubclassOfClass: [MyBaseClass class]]) { ... } —Jens

Re: How to check if a class derives from another?

2009-10-05 Thread Colin Howarth
On 6 Oct, 2009, at 03:35, Rick Mann wrote: I have a need to tell if a class I'm loading dynamically is derived from another class. How do I do this? Perhaps NSObject's class method +superclass might help? ___ Cocoa-dev mailing list

Re: How to check if a class derives from another?

2009-10-05 Thread Rick Mann
Well, that's obvious. I wonder why I didn't see that when I was looking at the docs. Thanks! On Oct 5, 2009, at 18:41:38, Jens Alfke wrote: On Oct 5, 2009, at 6:35 PM, Rick Mann wrote: I have a need to tell if a class I'm loading dynamically is derived from another class. How do I do