I'm beginning to wonder if it's possible to save and restore the current disclosure state of the hierarchy of a NSOutlineView.

- Iterating the hierarchy does not save the state of hidden children.

- the persistentObject API is not useful in my case as I have multiple instances of the same NSOutlineView through multiple documents and I don't need/want to keep this piece of information in the defaults.

- When asked about this, the NSOutlineView oracle suggested to use the notification methods:

        - (void)outlineViewItemWillExpand:(NSNotification *)notification;
        - (void)outlineViewItemDidExpand:(NSNotification *)notification;
        - (void)outlineViewItemWillCollapse:(NSNotification *)notification;
        - (void)outlineViewItemDidCollapse:(NSNotification *)notification;

Unfortunately, this does not work as when you close a branch, every child of this branch receives the willCollapse and didCollapse notifications (Mac OS X 10.4.11).

Looking for other suggestions (if any left).



_______________________________________________

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 [EMAIL PROTECTED]

Reply via email to