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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to