Google didn't turn up anything and posting here proved fruitful yesterday, so I'll try it again.
In my program I have some menu items. At times I need some of the menu items to be disabled and then later reenabled (using them doesn't cause crashes, but the behavior is confusing and easier to just avoid letting users at it, especially when the menu item doesn't do anything due to the current state of the application). Alas, it won't work.
For example, in my awakeFromNib method, I have the following line:
[stop_menu setEnabled: NO];
I tested it and before this line [stop_menu isEnabled] returns 1 and afterwards returns 0. But, this change is not reflected in the GUI.
At the same time, I have controls all over the window being enabled and disabled during the life of the application without any problems. It's just the menu that's having problems.
Any ideas on what might be up with this? Is there some function to refresh the menu that has to be called? Any help would be greatly appreciated.
In my program I have some menu items. At times I need some of the menu items to be disabled and then later reenabled (using them doesn't cause crashes, but the behavior is confusing and easier to just avoid letting users at it, especially when the menu item doesn't do anything due to the current state of the application). Alas, it won't work.
For example, in my awakeFromNib method, I have the following line:
[stop_menu setEnabled: NO];
I tested it and before this line [stop_menu isEnabled] returns 1 and afterwards returns 0. But, this change is not reflected in the GUI.
At the same time, I have controls all over the window being enabled and disabled during the life of the application without any problems. It's just the menu that's having problems.
Any ideas on what might be up with this? Is there some function to refresh the menu that has to be called? Any help would be greatly appreciated.