• 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
Tracking changes to NSTableView datasource
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Tracking changes to NSTableView datasource


  • Subject: Tracking changes to NSTableView datasource
  • From: Andre Masse <email@hidden>
  • Date: Fri, 31 Oct 2008 18:37:10 -0400

Hi,

I have a datasource for an NSTableView which is a NSMutableArray (call it mainArray for the moment) and I'm not sure which way is better to manage add, update and delete rows. I can use either one array for each of those cases or add a field to the mainArray (like 1 for new, 2 for update) and only one array for the records to delete (I'm using a back-end database). The first problem with the former is if (when) the user add a row and modify it later on (but before any updates to the back-end are done) I will need to check if its a new row (by quering the newRows array) and then not add it to the update array if it is. Not counting keeping both array content in sync... With the later, only checking the field will tell me if its a new row or not. At this point, I prefer the second method and can't see too many problems with it... Now, how you guys handle these kind of things?

Any ideas, suggestions?

Thanks,

Andre Masse
_______________________________________________

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: Tracking changes to NSTableView datasource
      • From: Graham Cox <email@hidden>
  • Prev by Date: Re: NSRuleEditor/NSPredicateEditor selected rows
  • Next by Date: Re: Tracking changes to NSTableView datasource
  • Previous by thread: Re: Padding Zeros...
  • Next by thread: Re: Tracking changes to NSTableView datasource
  • Index(es):
    • Date
    • Thread