• 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: Trouble with NSSegmentedControl
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Trouble with NSSegmentedControl


  • Subject: Re: Trouble with NSSegmentedControl
  • From: Seth Willits <email@hidden>
  • Date: Mon, 16 Nov 2009 18:44:17 -0800


On Nov 16, 2009, at 2:09 PM, Dave DeLong wrote:

How can I achieve the behavior that I'm looking for (and that is implied in the documentation)?

NSSegmentedControl, like NSSplitView, leaves *much* to be desired. Over time, my solution has evolved into an NSSegmentedControl subclass with a few tweaks (like per-cell actions, and fixing of "selected cell" value funkiness), and a full custom control with different styles and behavior.


As for the action firing before the menu is shown, it doesn't look like my tweaked subclass does what you need it to. I'm sure my entirely-custom control does, though it's not really in a shareable state. I think there are little bugs and oddities, and lack of a standard appearance that would probably make you not want use it.

But....


Is there a way to set a different target and action for each segment?


Yes. This I can help you with. I'll send you the code off-list.



--
Seth Willits



_______________________________________________

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: Trouble with NSSegmentedControl
      • From: Dave DeLong <email@hidden>
References: 
 >Trouble with NSSegmentedControl (From: Dave DeLong <email@hidden>)

  • Prev by Date: Re: NSUndoManager and runModalForWindow: (again)
  • Next by Date: message to zombie NSWindowController
  • Previous by thread: Trouble with NSSegmentedControl
  • Next by thread: Re: Trouble with NSSegmentedControl
  • Index(es):
    • Date
    • Thread