• 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
NSSegmentedControl subclass and bindings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSSegmentedControl subclass and bindings


  • Subject: NSSegmentedControl subclass and bindings
  • From: Dorian Johnson <email@hidden>
  • Date: Fri, 29 Jun 2007 01:41:38 -0500

I have a custom NSSegmentedControl that has non-standard width, thus, I'm subclassing mouseDown and mouseUp to select the proper segment. This works fine, but now I need to use bindings with the selectedIndex property. I can't get it to work at all, though... any pointers?

Here's my mouseUp method:
	unsigned newSelectedSegment; // assume this is calculated and valid
	[self willChangeValueForKey:@"selectedSegment"];
	[self setSelectedSegment: newSelectedSegment];
	[self didChangeValueForKey:@"selectedSegment"];

I've tried using willChangeValueForKey with selectedIndex but that did nothing to resolve the problem. Any tips on how to get my subclassing behaving with bindings?

_______________________________________________

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: NSSegmentedControl subclass and bindings
      • From: mmalc Crawford <email@hidden>
  • Prev by Date: Re: Controlling the Mouse
  • Next by Date: TextViews, LayoutManagers, TextContainers - email@hidden
  • Previous by thread: Re: Why does autorelease work when release fails?
  • Next by thread: Re: NSSegmentedControl subclass and bindings
  • Index(es):
    • Date
    • Thread