Re: isKindOf: for two Class objects
Re: isKindOf: for two Class objects
- Subject: Re: isKindOf: for two Class objects
- From: Jesse Grosjean <email@hidden>
- Date: Fri, 7 Sep 2007 17:08:23 -0400
I have two Class objects and I want to see if one of them isKindOf:
the other. I started off with this code, but the test always fails:
Class arrayClass1 = [NSArray class];
Class arrayClass2 = [NSArray class];
if ([arrayClass1 isKindOfClass:arrayClass2]) {
NSLog(@"Success");
} else {
NSLog(@"Fail");
}
I can see why, since Class's must be their own thing, but I still
can't figure a good way to do my test.
Is this what you're looking for: [arrayClass1 isSubclassOfClass:
arrayClass2]?
Yes that does it! Dumb Jesse. Thanks!
Jesse
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden