objectForKey crashes for string formats
objectForKey crashes for string formats
- Subject: objectForKey crashes for string formats
- From: Lorenzo <email@hidden>
- Date: Thu, 22 May 2003 09:35:46 +0200
Hi,
I use a NSDictionary to localize my software in different languages.
I have just discovered that if I try to get from a NSDictionary
theKey = @"Cannot save the file:\r%@";
foundString = [gLanguageStringsDict objectForKey:theKey];
my application crashes if the key is in the dictionary.
And if the key is only:
theKey = @"Cannot save the file:\r";
objectForKey returns nil even if the key is in the dictionary.
And if the key is:
theKey = @"Cannot save the file:";
objectForKey finds the key and returns the string properly.
So, cannot I really use those characters \r and %@ ?
Is it a NSDictionary's bug?
Is it my fault?
Best Regards
--
Lorenzo
email: email@hidden
_______________________________________________
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.