• 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
[NSOutlineView] Saving/Restoring the hierarchy disclosure state (Reloaded)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[NSOutlineView] Saving/Restoring the hierarchy disclosure state (Reloaded)


  • Subject: [NSOutlineView] Saving/Restoring the hierarchy disclosure state (Reloaded)
  • From: Stéphane Sudre <email@hidden>
  • Date: Thu, 26 Jun 2008 00:46:27 +0200

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 (email@hidden)

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:
This email sent to email@hidden


  • Follow-Ups:
    • Re: [NSOutlineView] Saving/Restoring the hierarchy disclosure state (Reloaded)
      • From: Jonathan Dann <email@hidden>
    • Re: [NSOutlineView] Saving/Restoring the hierarchy disclosure state (Reloaded)
      • From: Manfred Schwind <email@hidden>
  • Prev by Date: Re: NSString help!
  • Next by Date: Re: NSTrackingArea message lag
  • Previous by thread: Re: NSTrackingArea message lag
  • Next by thread: Re: [NSOutlineView] Saving/Restoring the hierarchy disclosure state (Reloaded)
  • Index(es):
    • Date
    • Thread