• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: FW: Enabling and Disabling menus
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FW: Enabling and Disabling menus


  • Subject: Re: FW: Enabling and Disabling menus
  • From: Ondra Cada <email@hidden>
  • Date: Wed, 22 Aug 2001 23:39:50 +0200

Henri,

>>>>>> Henri Lamiraux (HL) wrote at Wed, 22 Aug 2001 13:37:52 -0700:
HL> 2 - No, -validateMenuItem: is called when the menu is pulled down (you
HL> wan the user to see the menu disabled before he can select it) or when
HL> the user press some Command key equivalent.

Hmmmm, would have something to do with events as well. Since the following
code (tested in MOSXS1!):

@interface Controller : NSObject {
BOOL currentState;
}
- (void)menuAction:(id)sender;
@end
@implementation Controller
-(BOOL)validateMenuItem:(NSMenuItem*)item {
return !currentState; // ! just to have YES by default
}
- (void)menuAction:(id)sender {
currentState=!currentState;
[self performSelector:_cmd withObject:nil afterDelay:5];
}
@end

does not "blink" the item in torn off menu (pity, it should ;), but *ANY*
action (like clicking app's window outside all widgets) is sufficient to
redraw the torn off menu properly.
---
Ondra Cada
OCSoftware: email@hidden http://www.ocs.cz
private email@hidden http://www.ocs.cz/oc


References: 
 >Re: FW: Enabling and Disabling menus (From: Henri Lamiraux <email@hidden>)

  • Prev by Date: Docs
  • Next by Date: Re: Docs
  • Previous by thread: Re: FW: Enabling and Disabling menus
  • Next by thread: Re: FW: Enabling and Disabling menus
  • Index(es):
    • Date
    • Thread