• 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
identifying the main app controller
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

identifying the main app controller


  • Subject: identifying the main app controller
  • From: Daniel Child <email@hidden>
  • Date: Sat, 19 Jan 2008 13:15:51 -0500

Hi All,

I have read everything I thought might help with no luck.

I have a main controller instantiated via MainMenu.nib, and a window controller used to open another window after closing the first. Once I have left control of the main app controller and entered the window controller's code, how can I reference the original controller? For document apps, I found this:

Every nib file has an owner (FilesOwner). A typical NSWindowController nib file's owner is a NSWindowController object. What you should do is subclass NSWindowController, make the Properties.nib's file owner an instance of your subclass by selecting the file's owner in InterfaceBuilder, pressing Command-5 and selecting your subclass in the list. Make sure every user action in Properties.nib objects sends its message to the nib file's owner, i.e. to your NSWindowController subclass object. Then edit the action methods definitions in Xcode or ProjectBuilder. You can always access the appropriate NSDocument subclass from its NSWindowController by sending [self document].

I would think there must be an equally easy way to access the main app controller.

Thanks.

Daniel
_______________________________________________

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:
    • Re: identifying the main app controller
      • From: "I. Savant" <email@hidden>
  • Prev by Date: Re: Substitute a check box or a popup for a field editor in a tableview
  • Next by Date: Re: identifying the main app controller
  • Previous by thread: Re: Mounting disk images
  • Next by thread: Re: identifying the main app controller
  • Index(es):
    • Date
    • Thread