FROM : Ondra Cada
DATE : Tue Apr 12 00:25:58 2005
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_removed> http://www.ocs.cz
private <email_removed> http://www.ocs.cz/oc
DATE : Tue Apr 12 00:25:58 2005
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_removed> http://www.ocs.cz
private <email_removed> http://www.ocs.cz/oc
| Related mails | Author | Date |
|---|---|---|
| Ivan S. Kourtev | Apr 11, 23:46 | |
| Ondra Cada | Apr 12, 00:25 |






Cocoa mail archive

