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

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


References: 
 >Bindings and NSSegmentedControl (From: "J. Scott Anderson" <email@hidden>)

  • Prev by Date: double-click in nsview
  • Next by Date: Re: double-click in nsview
  • Previous by thread: Bindings and NSSegmentedControl
  • Next by thread: xcode-->java-->cocoa - how long? how many?
  • Index(es):
    • Date
    • Thread