Thursday, April 12, 2012

NSArrayController + NSTableView : automatically save changes without Core Data

OK, so I'm implementing a classic scenario :




  • A NSPopupButton with some items in it

  • When the selected value changes, my itemsArray is updated

  • The itemsArray is linked to an NSArrayController

  • Each item in the itemsArray is an NSMutableDictionary (with keys : title,content)

  • An NSTableView displays the titles of the arrangedObjects (binding)

  • An NSTextView displays the content of the selected item.



Now, what I want is to automatically save any changes to the itemsArray (or itemsArray's item title/content), but without using Core Data (which I suspect might have been the best way to go about it).



I imagine it's quite a basic question this one, but honestly I've never really like Cocoa's auto-magical way of doing things... so, I need your help...



How should I go about that?





No comments:

Post a Comment