Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Updating table rows with bindings



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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.