Updating table rows with bindings
Updating table rows with bindings
- Subject: Updating table rows with bindings
- From: "James W. Walker" <email@hidden>
- Date: Thu, 31 Jul 2008 00:00:33 -0700
When an NSTableView is set up with bindings and NSArrayController,
what is the right way to modify a row? I see NSArrayController
methods to add and remove objects, but nothing to modify one. I guess
I could remove and then add, but that seems ugly.
Before I started with bindings, it wasn't a problem. The model array
for the table was an NSMutableArrray of NSMutableDictionary, so I
could just find the dictionary for the row and update it. But
apparently [[ arrayController arrangedObjects] objectAtIndex: i ]
returns an immutable dictionary, so I can't do it that way. I can't
see how to work with the model array directly any more, because any
way I get indexes of selected items gives indexes into the arranged
objects, not the original array.
_______________________________________________
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