Question regarding menus and document based app.
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.