• 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
Updating table rows with bindings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Updating table rows with bindings
      • From: Keary Suska <email@hidden>
  • Prev by Date: Re: Multithreaded file read
  • Next by Date: KCGDisplaySetMainFlag not firing
  • Previous by thread: Re: Bindings to simulate spreadsheet functions in NSTableView?
  • Next by thread: Re: Updating table rows with bindings
  • Index(es):
    • Date
    • Thread