• 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
How to "marry" NSSegmentedControl and NSArrayController ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to "marry" NSSegmentedControl and NSArrayController ?


  • Subject: How to "marry" NSSegmentedControl and NSArrayController ?
  • From: Andrei Tchijov <email@hidden>
  • Date: Sun, 16 Oct 2005 23:49:43 -0400

Good evening,
In my application I am using NSSegmentedControl for "add object to the table" and "delete object from the table". As you all know NSSegmentedControl has single "target/action" outlet (which is strange design by itself, but it is not a topic of this post). On the other side, NSArrayController has two separate actions "add" and "remove". The question is:


What is "politically correct" way to make NSSegmentedControl to drive NSArrayController?

I end-up subclassing NSArrayController and adding "segmentedAction" action which invokes "add" or "remove" depending on which segment was clicked on. Is it bad idea?

You comments will be highly appreciated.

Andrei Tchijov
Leaping Bytes, LLC

_______________________________________________
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


  • Prev by Date: Checkboxes in a combo box
  • Next by Date: Re: Launching an app from Carbon app (newbie question)
  • Previous by thread: Checkboxes in a combo box
  • Next by thread: how to get application starts automatically
  • Index(es):
    • Date
    • Thread