Re: One more NSToolbar question
Re: One more NSToolbar question
- Subject: Re: One more NSToolbar question
- From: Matt Ridley <email@hidden>
- Date: Wed, 9 May 2001 19:38:36 +0100
On Wednesday, May 9, 2001, at 06:47 pm, Chuck Pisula wrote:
You should hook up the show/hide to the NSWindow your toolbar
is in. Doing this will allow the window to be the guy to
validate the menu item. If you really need to handle the show
hide yourself, you'll have to do your own validation.... or
possibly just forward on that part of your validation code to
the window!
Thanks to everyone who responded to my email on this. I've now
hooked up my Hide/Show Toolbar menu item to NSWindow's
toggleToolbarShown: action, and it works correctly (as well as
taking care of ensuring the menu item reads properly; "Hide" or
"Show" as appropriate, which is a really nice feature).
It also gets rid of the console message about an obsolete method
which I saw when I was using [toolbar setVisible:] instead. I'm
also almost certain that using setVisible didn't visually
"click" the toolbar widget at the right of the titlebar, whereas
toggleToolbarShown certainly does make it highlight.
Interestingly, using the Hide/Show Toolbar command in Mail does
visually highlight the widget, but using the same command in the
Finder doesn't. Maybe the Finder needs updated to use
toggleToolbarShown, or some such thing.
Best,
-Matt
--
Matt Ridley
<
http://www.mattridley.com/>