• 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: Linking a Menu To A Document
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Linking a Menu To A Document


  • Subject: Re: Linking a Menu To A Document
  • From: Sherm Pendley <email@hidden>
  • Date: Wed, 30 Jul 2003 17:27:51 -0400

On Wednesday, July 30, 2003, at 3:59 PM, Seth Willits wrote:

For example, if you create a new multi-document application in Project Builder and then create a new menu item in the file menu, how can I connect that to an action in the MyDocument class?

You don't - you connect it to First Responder, and Cocoa will figure out for you which instance of MyDocument represents the current document. If you're making the connection in IB, simply add the relevant action to the "First Responder" instance and make the connection. If you're using setTarget: on the menu item to make the connection at run-time, pass nil as the target.

Of all the examples I've looked at, not one has been constructed the way a true/complex multi-document application would be

Sorry, I don't agree with that. The examples from the books you named may not be constructed the way a multi-document app works in whatever environment you're used to, but they are an accurate representation of how it works in Cocoa.

I have Cocoa Programming from Anguish, Buck, and Yacktman (which I don't like and haven't read

With all due respect, may I suggest reading the book before passing judgment on it?

sherm--
_______________________________________________
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: Linking a Menu To A Document
      • From: Seth Willits <email@hidden>
References: 
 >Linking a Menu To A Document (From: Seth Willits <email@hidden>)

  • Prev by Date: Why I think I'm so lost
  • Next by Date: Re: Linking a Menu To A Document
  • Previous by thread: Linking a Menu To A Document
  • Next by thread: Re: Linking a Menu To A Document
  • Index(es):
    • Date
    • Thread