Re: NSMenu conundrum
Re: NSMenu conundrum
- Subject: Re: NSMenu conundrum
- From: John Timmer <email@hidden>
- Date: Thu, 24 Mar 2005 17:11:18 -0500
The problem here is that mouse events are received by NSViews, and there
doesn't seem to be a way to access the view of an NSMenuItem. Given this,
there seem to be two options:
Skip bindings and manually handle validation based on a combination of the
containing menu of a given item and the properties that the bindings were
observing.
Make 16 separate menus, and bind those.
Neither of them seem very appealing, I'm sure.
> 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.
_______________________________________________
This mind intentionally left blank
_______________________________________________
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