NSSegmentedControl subclass and bindings
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