Re: NSDictionary mutability test
Re: NSDictionary mutability test
- Subject: Re: NSDictionary mutability test
- From: Charles Steinman <email@hidden>
- Date: Mon, 8 Dec 2008 09:51:01 -0800 (PST)
----- Original Message ----
> From: Devon Ferns <email@hidden>
> To: "email@hidden" <email@hidden>
> Cc: email@hidden
> Sent: Monday, December 8, 2008 9:44:44 AM
> Subject: Re: NSDictionary mutability test
>
> Instead of using exceptions, wouldn't -(BOOL)respondsToSelector:(SEL)aSelector
> work if you test for an NSMutableDictionary mutable method?
> Or does that not work with class clusters either(can't try it since I'm not at
> home)
NSDictionary instances are indistinguishable from NSMutableDictionary instances except that the former throws an exception when you try to make it mutate. They are both instances of the exact same class and respond to the exact same methods.
Cheers,
Chuck
_______________________________________________
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