• 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: Validating a NSSegmentedControl in a toolbar
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Validating a NSSegmentedControl in a toolbar


  • Subject: Re: Validating a NSSegmentedControl in a toolbar
  • From: Joar Wingfors <email@hidden>
  • Date: Thu, 4 Jun 2009 18:29:09 -0700


On 4 jun 2009, at 18.10, Graham Cox wrote:

There's a note in the documentation for -validateToolbarItem: that "NSToolbar only calls this method for image items", which might explain it. So what do I need to do to make this work for the segmented control? I've read all the toolbar and validation documentation I can find but I'm none the wiser - nothing so far stands out as the obvious right way to proceed.


I like to back all of my view-type toolbar items by separate view controllers. In this design it is the job of these view controllers to monitor the state of your application that affects their views, and update the enabled / selected state appropriately. Your views, or view controllers, can often times use bindings to achieve this with minimal fuss and overhead. There is no built in support in NSToolbar for managing view controllers for your view-type toolbar items, so you would have to manage that part for yourself.

j o a r


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Validating a NSSegmentedControl in a toolbar
      • From: Graham Cox <email@hidden>
References: 
 >Validating a NSSegmentedControl in a toolbar (From: Graham Cox <email@hidden>)

  • Prev by Date: Re: No Title Bar on NSPanel
  • Next by Date: Re: No Title Bar on NSPanel
  • Previous by thread: Validating a NSSegmentedControl in a toolbar
  • Next by thread: Re: Validating a NSSegmentedControl in a toolbar
  • Index(es):
    • Date
    • Thread