Core Data, binding & selecting table rows upon document open
Core Data, binding & selecting table rows upon document open
- Subject: Core Data, binding & selecting table rows upon document open
- From: Modesitt Software <email@hidden>
- Date: Mon, 6 Feb 2006 14:47:09 -0800
I have a document based application using Core Data and Cocoa
Bindings. It's set up so that the documents save small cache files
that contain the window location, drawer configuration, etc., so
these items can be reset upon the document reopening. The document
contains a table, and the table data are bound to an array
controller. The cache file saves an NSIndexSet of selected table rows.
I am having trouble selecting the table rows when the document is
first open. In the document method windowControllerDidLoadNib, I
read the index set of previously selected rows and call [table
selectRowIndexes:savedIndexes byExtendingSelection:NO] and it doesn't
work; the rows aren't selected. I have tried calling this method
from the other methods such as showWindows, but it never works. How
can I select a set of rows when the document is first open? I
suppose I could somehow add it to a
NSManagedObjectContextObjectsDidChangeNotification, but it seems as
if there should be any easier way. Any suggestions appreciated!
Thanks,
Bill
_______________________________________________
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