Menu items sensitive to modifiers
Menu items sensitive to modifiers
- Subject: Menu items sensitive to modifiers
- From: email@hidden
- Date: Sun, 14 Apr 2002 21:44:26 -0700
I want to make a menu item change its title (and its enable state, in
some cases) when a modifier key is held down. This used to be a
reasonably common thing to do in MacOS <X, IIRC. But I can't figure out
any way to do it in Cocoa. My validateMenuItem: method doesn't get
called when the modifier keys change while the user is tracking the
menu. Neither does -[NSApplication sendEvent:]. It appears that a
private tracking loop is in effect, and I can't see a way to get in. Am
I missing something? Has anybody hacked up a way to do this? I looked
in the archives and didn't find anything relevant, and the docs seem to
be remarkably close-mouthed about the whole process of autoenabling --
when exactly it gets done, who does it, etc.
Thanks for any help...
Ben Haller
Stick Software
_______________________________________________
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.