Avoid NSDictionary keys containing dots?
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.