Re: NSSegmentedControl subclass and bindings
Re: NSSegmentedControl subclass and bindings
- Subject: Re: NSSegmentedControl subclass and bindings
- From: mmalc Crawford <email@hidden>
- Date: Fri, 29 Jun 2007 03:18:53 -0700
On Jun 28, 2007, at 11:41 PM, Dorian Johnson wrote:
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?
This general issue has come up several times in the past week or so.
See recent archives and <http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaBindings/Concepts/HowDoBindingsWork.html
>
mmalc
_______________________________________________
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