Re: Mutability
Re: Mutability
- Subject: Re: Mutability
- From: "John C. Randolph" <email@hidden>
- Date: Tue, 20 Nov 2001 06:24:59 -0800
On Monday, November 19, 2001, at 10:07 AM, Norbert Heger wrote:
But be aware of the fact, that even if an instance is immutable, it
will be
a subclass of a mutable (abstract) superclass. Thus invoking [array
isKindOfClass:[NSMutableArray class]] will NOT tell you if the given
array
is in fact mutable. Instead it always returns YES.
That's exactly reversed from what the docs and the headers both say
about all of the Foundation collection classes. NSArray is the parent
of NSMutableArray, NSSet is the parent of NSMutableSet, and so forth.
-jcr
"For every complex problem there is an answer that is clear, simple, and
wrong." -- H L Mencken
References: | |
| >Mutability (From: Norbert Heger <email@hidden>) |