• 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
NSDictionary mutability test
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSDictionary mutability test


  • Subject: NSDictionary mutability test
  • From: "email@hidden" <email@hidden>
  • Date: Mon, 8 Dec 2008 17:15:45 +0000

There are a number of posts detailing with the ethics of the issue of determining an object's mutability.
eg: http://www.cocoabuilder.com/archive/message/cocoa/2004/7/7/111173
Does anyone have a current informed pragmatic opinion on how to deal with the following example?


I am not trying to determine program flow by determining mutability, merely trying to limit the number of self inflicted injuries.
The following never seems to assert, regardless of whether dict is mutable or not.


NSAssert([dict isKindOfClass:[NSMutableDictionary class]], @"dict is not mutable");

I know that it is my responsibility to remain aware of an object's allocated class but sometimes I find myself wanting.

Jonathan Mitchell

Central Conscious Unit
http://www.mugginsoft.com




_______________________________________________

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


  • Follow-Ups:
    • Re: NSDictionary mutability test
      • From: Charles Steinman <email@hidden>
    • Re: NSDictionary mutability test
      • From: Mike Abdullah <email@hidden>
  • Prev by Date: Re: Shell tool with GUI
  • Next by Date: Not getting KeyDown events (and other peculiar things)
  • Previous by thread: Re: NSArray represented in 2 different views at same time
  • Next by thread: Re: NSDictionary mutability test
  • Index(es):
    • Date
    • Thread