• 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
Observing change of selection
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Observing change of selection


  • Subject: Observing change of selection
  • From: Bob Peterson <email@hidden>
  • Date: Wed, 26 Jan 2005 19:16:46 -0500

I have tried a couple ways to know when the selection has changed in my NSArrayController. Since view-to-controller bindings know when this happens, I'd like to know how I can write some custom code know when the selection changes.

What I want to do is change the number of ticks marks on an NSSlider based on the current selection. Each object in the array can have a different number of ticks. NSSlider doesn't make the numberOfTickMarks property bindable (according to Interface Builder and the bindings doc, so I need to write some code.

I've tried extending all of the NSArrayController and NSObjectController methods that change the selection. I've tried registering an observer for various selection keys using addObserver:forKeyPath:options:context:.

Y'all have never failed me yet, so thanks in advance.
\bob

_______________________________________________
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


  • Follow-Ups:
    • Re: Observing change of selection
      • From: Guy English <email@hidden>
  • Prev by Date: Re: Printing an NSTableView
  • Next by Date: Re: Database
  • Previous by thread: Creating file packages
  • Next by thread: Re: Observing change of selection
  • Index(es):
    • Date
    • Thread