Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting the Item from NSOutlineView's Notifications



On Jun 30, 2005, at 6:06 PM, Dan S. Camper wrote:

The method returns an array of UUIDs that I can
use find my objects again to re-expand them ([self expandItem]). I run this
just before closing my window, but you could trigger it at other places
(even that notification).

I could do it on the window close, but in this project, the document is autosaved instantly. I think the overhead incurred by writing the expanded value to a database has got to be very small, but I won't know until it's actually done.


The one minor gotcha I discovered is this: If you start with a
fully-collapsed list and try to re-expand, you must expand parents before
children or it won't work. If you re-expand in the same order as the array
above, it will work.

Right. After the list is loaded I can start from the top row and iterate through them (row by row from top to bottom) and expand each parent as needed. That'll work, though I'm most worried about the visual implications. It hopefully won't have any, but I'm not yet positive about that.



Thanks for the suggestions,

--
Seth Willits

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >Re: Getting the Item from NSOutlineView's Notifications (From: "Dan S. Camper" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.