• 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
Question regarding menus and document based app.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Question regarding menus and document based app.


  • Subject: Question regarding menus and document based app.
  • From: "Paul F." <email@hidden>
  • Date: Sun, 10 Aug 2003 15:02:23 -0400

Hi-

I am a relative Cocoa newbie and I have a question about how to do something.

I'm writing a Document based app with a custom view. I want to have a menu item that sends a message to the view to get it to do something. I figure I should go through my NSDocument subclass to reach the view. The problem is connecting the menu item to the document.

Seems that there are a couple of ways to do this. First, I could create an application controller and instantiate that within MainMenu.nib. I'm not sure how to connect from that to the particular document that I'm currently working on.

I suppose I could use Notifications, but that seems like overkill to me. I just want to have the menu send a message to my currently active document, not all open documents.

I tried using the FirstResponder, but my custom view doesn't take keyboard input and besides the selector I wanted to call wasn't listed in the Inspector.

I'm a little confused as to the best way to do this. I think I'm probably only missing something quite obvious. I've looked through all my books and still I'm unsure how to proceed.

Thanks,
Paul
--
Paul Franceus |
RABA Technologies | All Your Base are Belong to us.
email@hidden |
_______________________________________________
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: Question regarding menus and document based app.
      • From: Seth Willits <email@hidden>
  • Prev by Date: Re: Contextual Help
  • Next by Date: Re: Today is messed up
  • Previous by thread: Font "chiseled in" look on metal?
  • Next by thread: Re: Question regarding menus and document based app.
  • Index(es):
    • Date
    • Thread