• 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
objectForKey crashes for string formats
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: objectForKey crashes for string formats
      • From: Chris Hanson <email@hidden>
    • Re: objectForKey crashes for string formats
      • From: Chuck Soper <email@hidden>
  • Prev by Date: To better clarify my question...
  • Next by Date: Re: Quicktime and NSThread
  • Previous by thread: To better clarify my question...
  • Next by thread: Re: objectForKey crashes for string formats
  • Index(es):
    • Date
    • Thread