NSMenu conundrum
NSMenu conundrum
- Subject: NSMenu conundrum
- From: Ben Dyer <email@hidden>
- Date: Thu, 24 Mar 2005 17:11:15 +0000
Hi all,
I've been trying to implement a rather unusual Menu bar menu for an
application. I've tried a number of approaches, but I've hit a brick
wall.
Here's what I'm trying to do :
From a menu bar menu, I need to display a list of 16 menu items. Each
menu item has a submenu which is to display a common (with a fairly
complex hierarchy) NSMenu (defined in IB) where many of those menu
items have values and enables controlled via bindings. I need to set
those bindings differently depending on which of the 16 parent items
was chosen (no clicks - which doesn't help)
The problem I have is that I can't use menu delegation because I don't
get a notification each time one of the 16 menu items is selected -
the delegation seems to to use caching and therefore I can't set my
bindings correctly before displaying the common menu.
What I need is some sort of notification to tell me the cursor is on a
menu item before it displays its submenu (and I need that to happen
every time an item is selected).
The menu concept is a little odd, and something I don't like, but the
client insists upon it.
I was thinking that maybe I should be sub-classing MenuItemCell in
order to establish which cell has been highlighted, but I'm a little
unsure if this will be effective as the Cocoa documentation states that
it has been deprecated.
Has anyone had a similar problem? Or can anyone offer any insight?
Many thanks,
Ben.
_______________________________________________
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