Re: RS: NSObject members class and isMemberOfClass
Re: RS: NSObject members class and isMemberOfClass
- Subject: Re: RS: NSObject members class and isMemberOfClass
- From: Chris Suter <email@hidden>
- Date: Sat, 8 Sep 2007 00:17:16 +1000
On 07/09/2007, at 11:15 PM, Finlay Dobbie wrote:
There isn't any supported way of determining if an array is mutable or
not. You probably could do it using undocumented private
CoreFoundation functions, but you shouldn't really need to.
There are no private functions in CoreFoundation that you can use.
For purely academic purposes (not to be used in production code) the
following will tell you if an array happens to be mutable.
@interface NSArray (IsMutable)
- (BOOL)isMutable;
@end
@implementation NSArray (IsMutable)
- (BOOL)isMutable
{
return ((unsigned short *)self)[2] & 3 ? YES : NO;
}
@end
- Chris
_______________________________________________
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