• 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: problem disabling a menu item
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: problem disabling a menu item


  • Subject: Re: problem disabling a menu item
  • From: Ondra Cada <email@hidden>
  • Date: Tue, 12 Apr 2005 00:25:58 +0200

Ivan,

On 11.4.2005, at 23:46, Ivan S. Kourtev wrote:

I am not getting the expected behavior when I try to disable a menu item programmatically in a simple application. I do

  [[NSApp mainMenu] setAutoenablesItems:NO];
  [_someMenuItem setEnabled:NO];

yet the _someMenuItem remains enabled.

Try at the first line [[_someMenuItem menu] setAutoenablesItems:NO] instead. I guess the item is not in the main menu :)


BTW, presumed _someMenuItem is an ivar, it should not begin by an underscore.
---
Ondra Čada
OCSoftware: email@hidden http://www.ocs.cz
private email@hidden http://www.ocs.cz/oc


Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >problem disabling a menu item (From: "Ivan S. Kourtev" <email@hidden>)

  • Prev by Date: Redo stack stolen
  • Next by Date: Re: Filtering the Contents of an Array Controller
  • Previous by thread: problem disabling a menu item
  • Next by thread: ScrollBar Position
  • Index(es):
    • Date
    • Thread