FROM : Ivan S. Kourtev
DATE : Mon Apr 11 23:46:42 2005
Hi,
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. I tried sending a setTitle:
message to _someMenuItem (just to make sure that the connection was
right) and it worked as described. So I think I am missing something
here, any suggestions?
On a more general level, I did read about the "Automatic Menu Enabling"
alternative method in Apple's documentation. Is Automatic the
preferred way to handle all menu enable/disable activity?
Thanks,
-- ivan
DATE : Mon Apr 11 23:46:42 2005
Hi,
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. I tried sending a setTitle:
message to _someMenuItem (just to make sure that the connection was
right) and it worked as described. So I think I am missing something
here, any suggestions?
On a more general level, I did read about the "Automatic Menu Enabling"
alternative method in Apple's documentation. Is Automatic the
preferred way to handle all menu enable/disable activity?
Thanks,
-- ivan
| Related mails | Author | Date |
|---|---|---|
| Ivan S. Kourtev | Apr 11, 23:46 | |
| Ondra Cada | Apr 12, 00:25 |






Cocoa mail archive

