• 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: Newbie Bindings Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Newbie Bindings Question


  • Subject: Re: Newbie Bindings Question
  • From: SA Dev <email@hidden>
  • Date: Tue, 17 May 2005 14:41:54 -0400


You're editing the model behind the controller's back. Take a look at this page: http://homepage.mac.com/mmalc/CocoaExamples/ controllers.html


Look at the section called, "Programmatic modifications to arrays not noticed by table view". In fact, read the whole page - it's very useful. Thanks to Mmalc for these examples.




On May 17, 2005, at 2:29 PM, Michael Bianco wrote:

Hey All,
Newbie Cocoa Programmer here with a simple (hopefully!) question.
I have a NSMutableArray in a controller class that is filled with
instances of a custom class. I made a NSArrayController whose content
array is bound to the NSMutableArray in my controller class. I have a
table view whose column is bound to the "state" key of
NSArrayController arrangedObjects. The table displays the data
correctly, but when i change the state key of a object in
NSMutableArray the table does not update to represent the change made.
If i click on the row in the table that represents the object that had
a change it will refresh its data and represent correctly the "state"
key of the object its representing. How would i get it to update its
data when the "state" key is changed? I would of assumed the table
column would register its self as a observer of the "state" key of
each of the objects in arrangedObjects, but as far as i can see it
doesn't. I know i could just send the table a reloadData message but
that would be synching the view with the model which is what cocoa
bindings is supposed to get rid of...
Thanks!
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40silentalcove.net


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
References: 
 >Newbie Bindings Question (From: Michael Bianco <email@hidden>)

  • Prev by Date: Re: A CoreData Limitation?
  • Next by Date: Javabeans in Cocoa/ObjC?
  • Previous by thread: Newbie Bindings Question
  • Next by thread: Web Objects, Core Data and XCode
  • Index(es):
    • Date
    • Thread