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 23:07:07 +1000
On 08/09/2007, at 6:07 AM, Nick Zitzmann wrote:
On Sep 7, 2007, at 7:15 AM, Finlay Dobbie wrote:
There isn't any supported way of determining if an array is
mutable or
not.
Actually, there is. Calling -classForCoder on an NSArray will
return [NSArray class], while calling it on an NSMutableArray will
return [NSMutableArray class].
I was actually referring to CoreFoundation which didn't appear to
have even an undocumented way of determining if the array is mutable
or not.
Having said that, I had forgotten about using classForCoder and it
turns out that it uses an undocumented function:
Boolean _CFArrayIsMutable (CFArrayRef array)
I hadn't spotted it because it's not in CF-lite.
- Chris
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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