Re: app delegate +initialize
Re: app delegate +initialize
- Subject: Re: app delegate +initialize
- From: Rob Keniger <email@hidden>
- Date: Thu, 8 Oct 2009 15:00:08 +1000
On 08/10/2009, at 1:39 PM, John Baldwin wrote:
> Inside the xib is a window which is set to visible at launch. The error happens in the window controller for this window, which is expecting the user defaults to be initialized by the AppController instance.
>
> So I'm expecting the AppController instance to be loaded and the +initialize method to be called before my window controller is loaded and its outlets start getting referenced.
Both the responses to this have been spot on, but I'd just add that what you can do is create your window in a separate xib, and then instantiate your window controller programmatically from your AppController at a point where you know the user defaults have been loaded. That way you don't need to worry about the order of loading objects from the xib as you control it explicitly.
--
Rob Keniger
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden