• 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
Menu and views
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Menu and views
      • From: Sherm Pendley <email@hidden>
  • Prev by Date: Re: Multi-line NSTokenField
  • Next by Date: Re: Re: Re: KVO question
  • Previous by thread: Re: generating the event
  • Next by thread: Re: Menu and views
  • Index(es):
    • Date
    • Thread