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

Re: Observing change of selection


  • Subject: Re: Observing change of selection
  • From: Guy English <email@hidden>
  • Date: Thu, 27 Jan 2005 18:36:44 -0500

The simplest way is to just be 'old-fashioned' about it. Make your
Controller object a delegate of the table view in question and
implement the (void)tableViewSelectionDidChange method. Just because
you're using bindings doesn't mean that the table view won't talk to
it's delegate anymore.

Hope that helps,
Guy


On Wed, 26 Jan 2005 19:16:46 -0500, Bob Peterson
<email@hidden> wrote:
> 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
>
 _______________________________________________
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: mmalcolm crawford <email@hidden>
References: 
 >Observing change of selection (From: Bob Peterson <email@hidden>)

  • Prev by Date: Re: A Question about cocoa-text.
  • Next by Date: Re: May I pack java in a dylib?
  • Previous by thread: Observing change of selection
  • Next by thread: Re: Observing change of selection
  • Index(es):
    • Date
    • Thread