NSMenuItem: [ ] Bug [ ] Unexpected Behavior [ ] Answer forthcoming
NSMenuItem: [ ] Bug [ ] Unexpected Behavior [ ] Answer forthcoming
- Subject: NSMenuItem: [ ] Bug [ ] Unexpected Behavior [ ] Answer forthcoming
- From: Stéphane Sudre <email@hidden>
- Date: Fri, 25 May 2001 17:30:04 +0200
From what I've seen, a NSMenuItem in a NSMenu in a the menu bar when it
is created in IB is disabled as long as there is no Action/Target linked
to it.
As soon as you create this link, the NSMenuItem is enabled.
Then could someone explain me why when you do a [thisAnnoyingMenuItem
setEnabled:NO]; it stays enabled ?
I've spent 15 minutes checking the name of the outlet is the same in PB
and IB. And I came to the conclusion it's either a bug or an unexpected
behavior.
I can do a workaround with this code:
[thisAnnoyingMenuItem setTarget:nil];
[thisAnnoyingMenuItem setAction:nil];
But it's NOT a good solution.
Please don't tell me I need to use NSMenuValidation. Please don't,
never, not here, no, no, no...