• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: One more NSToolbar question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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/>


  • Follow-Ups:
    • Re: One more NSToolbar question
      • From: Arno Gourdol <email@hidden>
References: 
 >Re: One more NSToolbar question (From: Chuck Pisula <email@hidden>)

  • Prev by Date: Re: One more NSToolbar question
  • Next by Date: Re: One more NSToolbar question
  • Previous by thread: Re: One more NSToolbar question
  • Next by thread: Re: One more NSToolbar question
  • Index(es):
    • Date
    • Thread