On Dec 8, 2008, at 10:44 AM, Devon Ferns wrote:

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)


It does not work with class clusters, since NSCFDictionary implements the mutable and immutable methods.

The only method I'm aware of that allows you to tell mutable dictionaries from immutable ones is to use the -classForCoder method. An immutable dictionary will return [NSDictionary class]; a mutable one will return [NSMutableDictionary class].

Nick Zitzmann
<http://www.chronosnet.com/>

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to