• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Know about Mutability
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Know about Mutability


  • Subject: Re: Know about Mutability
  • From: mmalcolm crawford <email@hidden>
  • Date: Thu, 13 Jan 2005 21:19:07 -0800


On Jan 13, 2005, at 8:41 PM, Andrew Pinski wrote:
What's wrong with
if ([myDict isKindOfClass:[NSMutableDictionary class]])
...
?
If it's an NSMutableDictionary, and it implements the methods in the NSMutableDictionary implementaion, then it has to be a subclass of NSMutableDictionary -- right?


Sadly not. A bug has already been filed to explain this in the documentation...

Yes but I thought there is already documentation describing class clusters.

Perhaps I over-trimmed -- the context was "But how do I know whether myDict is mutable or not?". Testing for isKindOfClass:[NSMutableDictionary class] does not work as you might expect...

mmalc




_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Know about Mutability
      • From: Hugh Hoover <email@hidden>
References: 
 >Re: Know about Mutability (From: James Bucanek <email@hidden>)
 >Re: Know about Mutability (From: mmalcolm crawford <email@hidden>)
 >Re: Know about Mutability (From: Andrew Pinski <email@hidden>)

  • Prev by Date: Re: Binding Tableviews (newbie) problems/questions
  • Next by Date: Re: editing NSCell
  • Previous by thread: Re: Know about Mutability
  • Next by thread: Re: Know about Mutability
  • Index(es):
    • Date
    • Thread