saving and restoring an NSTableView's selected row with CoreData
saving and restoring an NSTableView's selected row with CoreData
- Subject: saving and restoring an NSTableView's selected row with CoreData
- From: Rod Schmidt <email@hidden>
- Date: Wed, 3 Aug 2005 13:40:57 -0600
I'm using CoreData to populate an NSTableView. So, it's bound to an
NSArrayController which is connected to an entity. Everything works
fine, but I want to persist the selected row in the table. I tried my
usual approach of using tableViewSelectionDidChange to save the
selected row in the user defaults and then restoring it when
applicationDidFinishLaunching is called. This doesn't work with
CoreData because when applicationDidFinishLaunching is called the
table isn't populated yet, so my call to setSelectedRow on the table
view or the array controller is essentially ignored. So two questions:
1) How can I tell when an array controller has been populated with data?
2) Is there a way to use bindings to automatically save the selected
index into the user defaults and have it restored?
Thanks,
Rod Schmidt
www.infinitenil.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden