Re: Mutable class problems
Re: Mutable class problems
- Subject: Re: Mutable class problems
- From: "John C. Randolph" <email@hidden>
- Date: Mon, 24 Jun 2002 17:45:39 -0700
On Monday, June 24, 2002, at 05:11 PM, Rosyna wrote:
I have a method that can receive either Mutable or Immutable
Dictionaries. I try to determine what to do with the passed in
argument based on that. I am also trying to use isMemberOfClass:
method to determine if it's mutable. But...
NSStringFromClass([dict class]); //returns NSCFDictionary when dict
is declared as NSMutableDictionary
And
NSStringFromClass([NSMutableDictionary class]); //returns
NSMutableDictionary.
Is there another way to determine if it's immutable or not?
Generally speaking, what you should be doing is making a -copy
or a -mutableCopy of the given collection, depending on what you
need it to be.
How about filling us in on what you're doing?
-jcr
John C. Randolph <email@hidden> (408) 974-8819
Sr. Cocoa Software Engineer,
Apple Worldwide Developer Relations
http://developer.apple.com/cocoa/index.html
_______________________________________________
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.