• 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: Best way to notify the Controller when one Array object value is changed
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Best way to notify the Controller when one Array object value is changed


  • Subject: Re: Best way to notify the Controller when one Array object value is changed
  • From: Ken Thomases <email@hidden>
  • Date: Wed, 30 Jan 2008 18:41:44 -0600

On Jan 30, 2008, at 3:16 PM, Miguel Coxo wrote:

On Jan 30, 2008 8:07 AM, Ken Thomases <email@hidden> wrote:
On Jan 29, 2008, at 6:16 PM, Miguel Coxo wrote:

> Hello, so i have one ArrayController that is bound to one Array, and a
> tablecolumn that is bound to the ArrayController objects (not any
> particular
> value).
>
> As a normal behavior the controller gets notified when i add or remove
> objects, but i have a thread that every second updates the objects.
> What is
> the correct way to notify the Controller that a specific object
> values where
> changed?


Ty i will try that and post the result back =)
I did use this one* to notify the Controller of changes, maybe it will also work for changing just values =).


*  "Mutate the result of [self mutableArrayValueForKey:] rather than
directly mutating the array."



Ah, I see what you were getting at. You're changing properties of the objects in the array, and you need the controller to "notice" those changes even though it's not bound to those properties. Sorry, I didn't understand that part of your original question.


In an earlier thread I argued for a different approach to another reader:

http://lists.apple.com/archives/cocoa-dev/2007/Dec/msg01329.html

I hope that helps.

Cheers,
Ken

_______________________________________________

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: Best way to notify the Controller when one Array object value is changed
      • From: "Miguel Coxo" <email@hidden>
References: 
 >Best way to notify the Controller when one Array object value is changed (From: "Miguel Coxo" <email@hidden>)
 >Re: Best way to notify the Controller when one Array object value is changed (From: Ken Thomases <email@hidden>)
 >Re: Best way to notify the Controller when one Array object value is changed (From: "Miguel Coxo" <email@hidden>)

  • Prev by Date: re: CoreData and NSOperation
  • Next by Date: re: CoreData and insert in multithread
  • Previous by thread: Re: Best way to notify the Controller when one Array object value is changed
  • Next by thread: Re: Best way to notify the Controller when one Array object value is changed
  • Index(es):
    • Date
    • Thread