• 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
saving and restoring an NSTableView's selected row with CoreData
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re: NSValueTransformer for selectedObjects controller key - bug?
  • Next by Date: Re: NSTableView and variable row height with core data
  • Previous by thread: Re: Random number generator
  • Next by thread: NSOutlineView bug?
  • Index(es):
    • Date
    • Thread