To clarify.

App is running. User selects an item in the outline view. User quits app.

In windowWillClose save to user defaults an identifier for the item selected in the outline view.

At start up reload the outline view etc etc as already described.



On Jan 8, 2009, at 1:36 PM, Shawn Erickson wrote:

On Thu, Jan 8, 2009 at 12:04 PM, David Blanton <aired...@tularosa.net> wrote:
I want to look through all the items, find the last one selected before the app terminated so I can reselect that item. I wanted to be sure that all
items were loaded before I started looking.
Since reloadData is synchronous (thank you) I call my finding method right
after the reloadData call and I have the desired result!

I don't understand your need/desire to call reloadData in this
situation... If the user has selected an item then that item must have
been already known to the table/outline view. You only need to get the
currently selected item and turn that into some identifier that you
can persist. I see no reason to ask the table/outline reload things.

-Shawn



David Blanton




_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to