menu enabling/disabling in Java
menu enabling/disabling in Java
- Subject: menu enabling/disabling in Java
- From: John Timmer <email@hidden>
- Date: Mon, 23 Jul 2001 12:33:25 -0400
Greetings -
I'm trying to independently adjust several menu items in a contextual menu.
To do so, I'm going through and testing their names, and returning different
values based on that. At its simplest, my code looks like:
public boolean validateMenuItem(_NSObsoleteMenuItemProtocol menuItem) {
if (menuItem.title() == "Add File") return true;
else return false;
}
I've used an NSAlertPanel to determine that this method gets called at the
appropriate moment with the "Add File" string, yet it's still disabled.
Does anybody have any suggestions?
Also, any news on how much longer we'll have to use an obsolete object?
Thanks,
Jay