• 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: Newb: Targeting an instance of a class instantiated by a NIB file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • [SOLVED] Re: Newb: Targeting an instance of a class instantiated by a NIB file
      • From: Brad Gibbs <email@hidden>
References: 
 >Newb: Targeting an instance of a class instantiated by a NIB file (From: Brad Gibbs <email@hidden>)
 >Re: Newb: Targeting an instance of a class instantiated by a NIB file (From: Jonathan Hess <email@hidden>)
 >Re: Newb: Targeting an instance of a class instantiated by a NIB file (From: Brad Gibbs <email@hidden>)
 >Re: Newb: Targeting an instance of a class instantiated by a NIB file (From: Jonathan Hess <email@hidden>)
 >Re: Newb: Targeting an instance of a class instantiated by a NIB file (From: Jonathan Hess <email@hidden>)
 >Re: Newb: Targeting an instance of a class instantiated by a NIB file (From: Brad Gibbs <email@hidden>)
 >Re: Newb: Targeting an instance of a class instantiated by a NIB file (From: Jonathan Hess <email@hidden>)

  • Prev by Date: Re: Newb: Targeting an instance of a class instantiated by a NIB file
  • Next by Date: Re: Transparent Background for a Progress Indicator (NSView)
  • Previous by thread: Re: Newb: Targeting an instance of a class instantiated by a NIB file
  • Next by thread: [SOLVED] Re: Newb: Targeting an instance of a class instantiated by a NIB file
  • Index(es):
    • Date
    • Thread