• 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
NSMenuItem: [ ] Bug [ ] Unexpected Behavior [ ] Answer forthcoming
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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...


  • Follow-Ups:
    • Re: NSMenuItem: [ ] Bug [ ] Unexpected Behavior [ ] Answer forthcoming
      • From: Andrew Platzer <email@hidden>
    • Re: NSMenuItem: [ ] Bug [ ] Unexpected Behavior [ ] Answer forthcoming
      • From: email@hidden
  • Prev by Date: Re: Java/Cocoa-Java Delay
  • Next by Date: Re: Type/Creator Codes
  • Previous by thread: Re: Question on NSBezierPath
  • Next by thread: Re: NSMenuItem: [ ] Bug [ ] Unexpected Behavior [ ] Answer forthcoming
  • Index(es):
    • Date
    • Thread