Re: Override NSDocumentController?
Re: Override NSDocumentController?
- Subject: Re: Override NSDocumentController?
- From: j o a r <email@hidden>
- Date: Sat, 7 Dec 2002 16:40:39 +0100
Read the documentation for NSToolbar > Programming Topics: Toolbar >
How Toolbars Work > NSWindow and the toolbar
==================================================================
NSWindow has a number of methods to support NSToolbar: toolbar and
setToolbar: are for attaching a toolbar to the window;
toggleToolbarShown: is the action for the Hide Toolbar / Show Toolbar
menu item; runToolbarCustomizationPalette: is the action for the
Customize Toolbar menu item.
In Interface Builder, place the Hide Toolbar/Show Toolbar and Customize
Toolbar menu items together in that order in the View menu and hook
them up to First Responder. NSWindow validates both toolbar menu items
and takes care of ensuring that the toggling between Hide Toolbar and
Show Toolbar stays in sync with the actual state of the toolbar.
==================================================================
j o a r
On Saturday, Dec 7, 2002, at 15:28 Europe/Stockholm, Rob In der Maur
wrote:
I've spotted that in my MainMenu.nib, the toolbar can be shown/hide by
connecting the Show/Hide Toolbar menu item to the
FirstResponder:toggleToolbarShown: action. I presume is this taken
care of by the NSDocumentController class? However, there doesn't seem
to be an NSDocumentController action for customizing the toolbar. Am I
right in assuming that in order to facilitate this through a menu
choice defined in my MainMenu.nib, I have to subclass
NSDocumentController and implement a customize: method myself? Or is
there an alternative way? And if I have subclassed
NSDocumentController, how do I make it available in my MainMenu.nib
(more specifically to the menuchoices)?
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.