• 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
Re: NSPropertyDescription userInfo
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSPropertyDescription userInfo


  • Subject: Re: NSPropertyDescription userInfo
  • From: Jim Correia <email@hidden>
  • Date: Sat, 5 Nov 2005 16:48:33 -0500

On Nov 5, 2005, at 1:21 PM, mmalcolm crawford wrote:

The localisation dictionary is set up lazily by the persistent document.

That seems to be the case for non-document based CoreData apps as well.

If you do something in the user interface that requires a localised string, it is retrieved correctly.

So if I need a localized name for my own purposes (say in a validateFoo:error:} I'll need to ensure that it is initialized.


You can set up the dictionary directly yourself:

NSString *localizationDictionaryPath = [[NSBundle mainBundle]
	pathForResource:@"MyDocumentModel" ofType:@"strings"];

NSDictionary *localizationDictionary = [NSDictionary
	dictionaryWithContentsOfFile:localizationDictionaryPath];

[[self managedObjectModel] setLocalizationDictionary:localizationDictionary];

In this case of a merged model though, it doesn't appear to be quite so simple to make sure all the appropriate .strings files are loaded.


Unless there is a good reason not to that I'm not seeing, asking for the localizationDictionary should trigger the lazy setup. If there is, perhaps there should be another public way for me to ensure that I can get back a localization dictionary, so I can always take advantage of the localization auto setup done by the frameworks, and don't have to roll my own.

I'll file an enhancement request.

Jim
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: NSPropertyDescription userInfo
      • From: mmalcolm crawford <email@hidden>
References: 
 >NSPropertyDescription userInfo (From: "Steve@DotMac" <email@hidden>)
 >Re: NSPropertyDescription userInfo (From: Jim Correia <email@hidden>)
 >Re: NSPropertyDescription userInfo (From: mmalcolm crawford <email@hidden>)
 >Re: NSPropertyDescription userInfo (From: Jim Correia <email@hidden>)
 >Re: NSPropertyDescription userInfo (From: Jim Correia <email@hidden>)
 >Re: NSPropertyDescription userInfo (From: mmalcolm crawford <email@hidden>)
 >Re: NSPropertyDescription userInfo (From: Jim Correia <email@hidden>)
 >Re: NSPropertyDescription userInfo (From: mmalcolm crawford <email@hidden>)

  • Prev by Date: Re: nested autorelease pools?
  • Next by Date: 10.4.3 : CoreData crash
  • Previous by thread: Re: NSPropertyDescription userInfo
  • Next by thread: Re: NSPropertyDescription userInfo
  • Index(es):
    • Date
    • Thread