Re: How to find what kind of Objects are contained in NSArray
Re: How to find what kind of Objects are contained in NSArray
- Subject: Re: How to find what kind of Objects are contained in NSArray
- From: Mark Onyschuk <email@hidden>
- Date: Sat, 10 Apr 2004 16:23:29 -0400
You can use -isKindOfClass: like so:
if ([myObject isKindOfClass:[NSArray class]]) {
} else ...
The isKindOf: method will test whether the receiver is an instance of
the class or any of its subclasses. I believe (no docs infront of me,
and I've rarely used it) that the method isInstanceOfClass: or somesuch
will perform the more restricted test.
-Mark
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.