• 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: Listening for changes in a table
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Listening for changes in a table


  • Subject: Re: Listening for changes in a table
  • From: Chris Idou <email@hidden>
  • Date: Thu, 18 Sep 2008 17:43:01 -0700 (PDT)

Well I do have the checkbox bound to the controller. It is bound to one of the attributes in the array of mutable dictionaries contained within my NSArrayController.

But I don't see how this lets me get control to do something when someone clicks the checkbox.

Yes I can put an action on the ButtonCell, but this doesn't tell me which record in the array  the  clicked cell relates to.


--- On Wed, 9/17/08, Kyle Sluder <email@hidden> wrote:

> From: Kyle Sluder <email@hidden>
> Subject: Re: Listening for changes in a table
> To: email@hidden
> Cc: email@hidden
> Date: Wednesday, September 17, 2008, 11:54 PM
> On Wed, Sep 17, 2008 at 8:46 PM, Chris Idou
> <email@hidden> wrote:
> > I've got a NSTableView controlled by an
> NSArrayController, which uses an array of
> NSMutableDictionaries as its controlled objects. One of the
> columns is a checkbox. These dictionaries are ultimately
> stored in the user's preferences. How would I get
> immediate notification if a user changed one of the
> checkboxes? I would need to know which record (dictionary)
> the checkbox referred to.
>
> You would probably want to bind the checkbox to a property
> on the
> model object, or use the standard target/action mechanism
> on the
> NSButtonCell belonging to the table column.
>
> In other words, your question doesn't really make
> sense.  You seem to
> be going at it backwards; you shouldn't be concerned at
> all about the
> table view, this is either something for the model or the
> controller
> to be taking care of.
>
> --Kyle Sluder



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Listening for changes in a table
      • From: "I. Savant" <email@hidden>
    • Re: Listening for changes in a table
      • From: Ken Thomases <email@hidden>
References: 
 >Re: Listening for changes in a table (From: "Kyle Sluder" <email@hidden>)

  • Prev by Date: Re: Differences between -isEqual: and -isEqualTo:?
  • Next by Date: Re: Differences between -isEqual: and -isEqualTo:?
  • Previous by thread: Re: Listening for changes in a table
  • Next by thread: Re: Listening for changes in a table
  • Index(es):
    • Date
    • Thread