Right, and in other places it works for me.  For instance, I have a window with 
text fields bound to a model object through an object controller.  Updating 
properties of the model updates the text fields.

Reading your test below, one thing I was forgetting is that I am not binding a 
column in the table view to any specific property.  I have one column bound to 
arrangedObjects and a custom cell that draws all the information (think Apple 
Mail with the subject line and then a snippet below).  So, I guess it does make 
sense that the table view does not update.  Perhaps reloadData after I change 
the item.

The menu item's state property is bound to the archive property of 
selectedObjects.  Seems like that should update appropriately.  The only 
difference between that and your test is that I am not using an external array. 
 I am just receiving the action from the menu item, then iterating over 
selectedObjects and changing the property on each.



On Nov 22, 2012, at 1:36, "jonat...@mugginsoft.com" <jonat...@mugginsoft.com> 
wrote:

> On 21 Nov 2012, at 22:19, Randy Widell <bornagainsl...@gmail.com> wrote:
> 
>> Hmm.  Well, I am updating the model (and the database that backs it).  I 
>> just need the UI to reflect it.
> Hmm, that sounds wonky.
> The whole point of binding is that you can update your model and have your UI 
> reflect the change without any other intervention.
> Is this occurring or not?
> 
> Say you have a model M with properties P1 and P2.
> 
> 1. Instantiate an array A of N model M objects.
> 2. Set the content of array controller AC to array A
> 3. Bind table view TV col1 to AC.arrangedObjects.P1 and col2 to 
> AC.arrangedObjects.P2
> 
> Now you should be able to update any model M property and see the changes 
> reflected in the UI and vice versa.
> 
> Regards
> 
> Jonathan Mitchell
> Mugginsoft LLP
> 
> 
> 
> _______________________________________________
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> 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:
> https://lists.apple.com/mailman/options/cocoa-dev/bornagainslakr%40gmail.com
> 
> This email sent to bornagainsl...@gmail.com

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to