Re: Select root of NSMenu's Sub Menu?
Re: Select root of NSMenu's Sub Menu?
- Subject: Re: Select root of NSMenu's Sub Menu?
- From: Nicholas Riley <email@hidden>
- Date: Wed, 9 Oct 2002 05:34:33 -0500
- Mail-followup-to: Rob Petrovec <email@hidden>, Cocoa Development <email@hidden>
On Wed, Oct 09, 2002 at 03:17:44AM -0700, Rob Petrovec wrote:
>
Hey,
>
I have an NSMenu that I am building from scratch programmatically
>
(caling [NSMenu addItem] etc). It has a couple sub menu's in it. Each menu
>
item has an action associated with it and when the user selects a menu item
>
that action proc gets called with no problems... But when the user selects
>
the root of one of the sub directories (i.e. the menu item with the triangle
>
in the name). The action proc does not get called. Nothing happens. How
>
do I get these menu items to be selectable? They have action procs, and
>
their target is "self". What else do I have to do to them? Thanks for any
>
help you can give...
This is not supported in Cocoa, only in Carbon. You can probably use
some unsupported hack to get it to work, though, since Cocoa menus
wrap Carbon menus. The common workaround (see OmniWeb's Bookmarks
menu, or "Associate with Interface" in my F-Script Anywhere) is to
replicate the submenu title as the first item of the submenu.
--
=Nicholas Riley <email@hidden> | <
http://www.uiuc.edu/ph/www/njriley>
Pablo Research Group, Department of Computer Science and
Medical Scholars Program, University of Illinois at Urbana-Champaign
_______________________________________________
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.