I'm not sure how to describe what I need but I'll give it a try, via an example :
Let's say we have a window and a sidebar, and want to toggle it (I mean the sidebar : on/off).
Now, let's also say that :
- The user may toggle the sidebar via an item at the Main menu (e.g. Show Sidebar / Hide Sidebar)
- The user may also toggle the sidebar via a button
- And there is also another item, in some other menu, to do the very same thing (Show/Hide Sidebar)
What would be the most practical Cocoa-friendly approach to achieve that?
Of course, that means that, e.g. :
- When somebody clicks the button, apart from the sidebar (showing or hiding), the menu items must now be showing the current status of the sidebar (e.g. "Show sidebar" must now turn to "Hide Sidebar" in all possible instances within menus, etc)
I hope you get the idea; it's definitely not something difficult; but I'm definitely confused on how I could use all of Cocoa's tricks to do it fast.
Thanks!