Re: Newb: Targeting an instance of a class instantiated by a NIB file
Re: Newb: Targeting an instance of a class instantiated by a NIB file
- Subject: Re: Newb: Targeting an instance of a class instantiated by a NIB file
- From: Brad Gibbs <email@hidden>
- Date: Fri, 12 Sep 2008 20:37:41 -0700
Hey Jon,
It is a non-document-based app. Only one instance of each window
should ever be open at one time.
I have an AppController class that is the NSApp delegate. In the
AppController's awakeFromNib I alloc the MainWindowController and
initWithNib. In the MainWindowController, I have an IBAction for a
button that allocs the MainMenuWindowController and initWithNib's the
MainMenu (which I'm implementing with a HUD panel and the BGHUDAppKit).
I'll have to look into putting some references in the AppController.
Brad
On Sep 12, 2008, at 7:52 PM, Jonathan Hess wrote:
Hey Brad -
What code is responsible for creating each of the two window
controllers? Perhaps that code could tell each of the window
controllers about each other. Or, it sounds like your application
isn't document based. Are there ever multiple instances of the two
windows you're currently working with? If not, perhaps your
NSApplication subclass, or application delegate, should have a
reference both window controllers and you could use that object to
be the missing link.
Jon Hess
_______________________________________________
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