• 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
Core Data, binding & selecting table rows upon document open
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: Core Data, binding & selecting table rows upon document open
      • From: Chris Hanson <email@hidden>
  • Prev by Date: Re: NSSegmentedControl drawing problems in unified toolbar
  • Next by Date: [MEET] Next CoocaHeads! Thursday Feb 9 and Tuesday Feb 14
  • Previous by thread: Re: Double Fun
  • Next by thread: Re: Core Data, binding & selecting table rows upon document open
  • Index(es):
    • Date
    • Thread