• 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: Where to set default user defaults?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Where to set default user defaults?


  • Subject: Re: Where to set default user defaults?
  • From: "Dennis C.De Mars" <email@hidden>
  • Date: Sat, 22 Nov 2003 05:24:55 -0800

I think I had a problem setting the default preferences early enough; I ended up doing it in the -init method of my app delegate. This is instantiated when theMainMenu.nib file is loaded. I'm pretty sure this will run before any of my other code runs. If you instantiate any of your other classes in MainMenu.nib, of course, this is no longer guaranteed, but otherwise this seems to work well. (You could also do ti from the +initialize method of the app delegate class, but since this class is generally a singleton, it's practically equivalent to doing it in the -init method).

- Dennis D.

On Nov 21, 2003, at 5:38 AM, John Timmer wrote:

I know there's been some discussion in the past about what the order of
"wakeFromNib" calling is (and the answer seems to be "none is guaranteed").
A related question that I couldn't find in the archives - are all the "init"
methods called before all the "awakeFromNib" methods?

The reason I'm asking is that I want to set some default user defaults for
the first time the app launches, and I'm going to need some of them before
the application's interface gets displayed. So, in short, I need to have
something that's called first during the app launching process.

Thanks,

JT
_______________________________________________
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.
_______________________________________________
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.

References: 
 >Where to set default user defaults? (From: John Timmer <email@hidden>)

  • Prev by Date: Re: Search Kit memory use
  • Next by Date: Reading from an NSInputStream
  • Previous by thread: Re: Where to set default user defaults?
  • Next by thread: Re: [OT] Don't leak memory!!
  • Index(es):
    • Date
    • Thread