Hi,

In short, I need a more reliable way to pass references to my MainWindowController into objects that are awaking from nib files. Trying to set the mMainWindowController variable to self.view.window.windowController in the awakeFromNib method seems to be happening before the MainWindowController is instantiated, so, it sets the variable to NULL.

I need to call a method in the MainWindowController to switch views / viewControllers, passing in the new viewController as an argument. I can set the mainWindowController variable in the method that actually invokes the view switch, but that seems clunky. It seems like there should be a method I can call to set the variable once the view controller has awoken and the app has fully loaded. initWithCoder and awakeFromNib happen too soon and applicationDidFinishLaunching only gets sent to the app delegate.

Is this a good case for a singleton object?

Is there something I'm missing?

Thanks.
_______________________________________________

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