• 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: Responding to menu items
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Responding to menu items


  • Subject: Re: Responding to menu items
  • From: Darrin Cardani <email@hidden>
  • Date: Wed, 24 Sep 2003 17:58:12 -0500

At 7:35 PM -0500 9/23/03, Chris Hanson wrote:
On Tuesday, September 23, 2003, at 04:19 PM, Darrin Cardani wrote:
What I've done is create an AppController class, and added that to MainMenu.nib. It receives the openMovie message, then uses the shared document controller to get the current document and forwards the message to it. Is this the standard way of doing things? Is there a more direct way to do things? Am I going to need an AppController in most of my applications, which will do this sort of message > forwarding?

That's one way to do it, but the general Cocoa way to do this is to wire that menu item (in MainMenu.nib) to the First Responder.

Ah, I get it now. Very elegant. And much easier than having to write a FindCommandStatus () and ObeyCommand () function. I'm seeing a lot of things like this that should go into some sort of FAQ for PowerPlant programmers. Maybe I'll get inspired and start one. (I didn't just say that in public did I? Oops!)

Darrin
--
Darrin Cardani - email@hidden
President, Buena Software, Inc.
<http://www.buena.com/>
Video, Image and Audio Processing Development
_______________________________________________
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.

References: 
 >Re: Responding to menu items (From: Chris Hanson <email@hidden>)

  • Prev by Date: WebView - New Window Problem
  • Next by Date: loadNibNamed:owner: Who disposes of the loaded objects?
  • Previous by thread: Re: Responding to menu items
  • Next by thread: Don't launch helpers with Webkit?
  • Index(es):
    • Date
    • Thread