Menu and views
Menu and views
- Subject: Menu and views
- From: Livio <email@hidden>
- Date: Tue, 23 May 2006 16:19:47 +0200
Developing a Cocoa program I've a problem with menu actions and views (I
am new at Cocoa):
have a menu <Insert objects> in the main menu (declared in the
"MainMenu.nib" file) whose actions must involve a window view of class
"MyView" (from NSView), and the window is declared in a separate file
"Windows.nib".
How can I target the menu action to the window view? And how can I
enable-disable the menu when necessary? Note that I can have multiple
windows and multiple documents.
I read about automatic targeting, seeking through firstResponder until
it reaches the responding view, but is there a flag or what else to set
initializing the view? I mean, if I just put aNSTextField in the window
(in InterfaceBuilder) the <cut, cpy, paste...> menu items are
automatically enabled and work with the TextEditField... but nothing
happens with MyView.
How can I do?
Many thanks,
livio
iMac 500MHz
Mac OS X 10.3.6
XCode 1.0
InterfaceBuilder 2.4
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden