Re: Bindings and NSSegmentedControl
Re: Bindings and NSSegmentedControl
- Subject: Re: Bindings and NSSegmentedControl
- From: Fritz Anderson <email@hidden>
- Date: Tue, 14 Jun 2005 20:35:38 -0500
On 14 Jun 2005, at 2:15 PM, J. Scott Anderson wrote:
NSSegmented control is not allowing me to Control-Drag a connection
to my Array Controller, as you would normally do with a button
intended to add objects. Is there another way or should I replace
the segmented control with standard NSButtons?
I'm guessing that you're trying to establish a target-action
relationship between a _segment_ of the NSSegmentedControl and your
NSArrayController. You can't do that. An NSSegmentedControl is a
single control, and has one target, and one action method.
What you can do is have the NSSegmentedControl send an action to the
File's Owner. The handler for the action message can use the -
[NSSegmentedControl selectedSegment] method to determine which
segment was hit, and dispatch to the desired method of the
NSArrayController. (File's Owner will need an outlet to the
NSArrayController.)
-- F
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden