Hi all,
I am using XCode/IB 2.5. I am trying to create an app that has a toolbar. What I would like to do is have the toolBarItem be enabled when it is available/can be used and disabled when it is not. I have downloaded GenericToolBar and it is quite easy to set up and use. NSToolBar is more not as easy to set up (and since I am still learning Cocoa/OBJ-C I am going with ease of setup and understanding). If the ToolBarItem is enabled when I set up the toolBar, then when I try to disable it like this:
[myToolBarItem setEnabled:![myToolBarItem isEnabled]];
it compiles, and executes fine. However the toolBarItem does not change state. Likewise if I disable the toolBarItem, setEnabled:YES does not change its state. If I check the state by using NSLog, I can see that it is changing. Also if I go to customize the toolBar, the items in the list reflect their current state. I can remove the item then add it back in and it changes that way. Not the way I would expect it to work.
Is there some other piece of the puzzle I am not aware of?
Any help is greatly appreciated.
Thanks in advance,
-Don
I am using XCode/IB 2.5. I am trying to create an app that has a toolbar. What I would like to do is have the toolBarItem be enabled when it is available/can be used and disabled when it is not. I have downloaded GenericToolBar and it is quite easy to set up and use. NSToolBar is more not as easy to set up (and since I am still learning Cocoa/OBJ-C I am going with ease of setup and understanding). If the ToolBarItem is enabled when I set up the toolBar, then when I try to disable it like this:
[myToolBarItem setEnabled:![myToolBarItem isEnabled]];
it compiles, and executes fine. However the toolBarItem does not change state. Likewise if I disable the toolBarItem, setEnabled:YES does not change its state. If I check the state by using NSLog, I can see that it is changing. Also if I go to customize the toolBar, the items in the list reflect their current state. I can remove the item then add it back in and it changes that way. Not the way I would expect it to work.
Is there some other piece of the puzzle I am not aware of?
Any help is greatly appreciated.
Thanks in advance,
-Don