• 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
Avoid NSDictionary keys containing dots?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Avoid NSDictionary keys containing dots?


  • Subject: Avoid NSDictionary keys containing dots?
  • From: Jérôme Laurens <email@hidden>
  • Date: Fri, 16 Jul 2004 17:53:49 +0200

Hi all,

I've been fighting for more than hour to find that NSDictionary does not like the @"." key.

I had something like

NSLog(@"myObject is: %@", myObject);
[myMutableDictionary setObject: myObject forKey: MyKey];
NSLog(@"myObject is: %@", myObject);

The very weird output is

myObject is: <blah>
myObject is: myObject is:

as if the setObject: method was messing things up (what it actually did)

It took me more than one hour to remember that MyKey was @"." and to suspect some problem.
BTW, I was using the dot key with no problem for more than 2 months in the same app of course...
_______________________________________________
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.


  • Prev by Date: Re: getting a cell value [was: creating an NSTableColumn}
  • Next by Date: Re: Changing Cell Size in at TableView?
  • Previous by thread: Re: Possibly easy question: ignore Mouse downs
  • Next by thread: Re: cocoa-dev digest, Vol 2 #4493 - 14 msgs
  • Index(es):
    • Date
    • Thread