• 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: Writing a non-NSDocument based multiple document window apps
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Writing a non-NSDocument based multiple document window apps


  • Subject: Re: Writing a non-NSDocument based multiple document window apps
  • From: "Louis C. Sacha" <email@hidden>
  • Date: Sun, 14 Mar 2004 12:05:53 -0800

Hello...

In InterfaceBuilder, connect the menu items in the MainMenu.nib to the "First Responder" object alias in that nib. At run time, this will end up directing them to the active window if one exists (which would be your document window).

This is mentioned in the documentation somewhere, but I can't remember where at the moment. It might be in the InterfaceBuilder release notes or docs, and not the normal Cocoa documentation.

Hope that helps,

Louis


OK, this one is baffling me and, surprisingly, the online documents make no mention of this.

any menu/UI validation code will need to move to the NSDocument subclass, and you'll need to have menu items that you've wired up yourself that don't interact with firstResponder switch to that design.

If my main menu is in MainMenu.nib but the code to validate and respond to each item is in the document subclass, how do I hook up the two? I tried dragging MyDocument.h into MainMenu.nib but that didn't work. Do I have to route all commands through an application controller class?

- Steve
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: Writing a non-NSDocument based multiple document window apps
      • From: Steve Palmer <email@hidden>
References: 
 >Writing a non-NSDocument based multiple document window apps (From: Steve Palmer <email@hidden>)
 >Re: Writing a non-NSDocument based multiple document window apps (From: Scott Anguish <email@hidden>)
 >Re: Writing a non-NSDocument based multiple document window apps (From: Steve Palmer <email@hidden>)
 >Re: Writing a non-NSDocument based multiple document window apps (From: Steve Palmer <email@hidden>)

  • Prev by Date: Networking and threading
  • Next by Date: NSTask, setLaunchPath to remote server
  • Previous by thread: Re: Writing a non-NSDocument based multiple document window apps
  • Next by thread: Re: Writing a non-NSDocument based multiple document window apps
  • Index(es):
    • Date
    • Thread