• 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 expanded state of OutlineView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Saving expanded state of OutlineView


  • Subject: Saving expanded state of OutlineView
  • From: Quentin Mathé <email@hidden>
  • Date: Thu, 16 May 2002 18:31:25 +0200

I try to save the expanded state of an outlineView in order to have this expanded state unaltered when I remove or I add an element to the data source and I call reloadData. I only add or remove elements at the root level.

I have implemented the two data source methods below, they get called, but nothing happens (the expanded state isn't saved) :

- (id)outlineView:(NSOutlineView *)ov persistentObjectForItem:(id)item {
return [NSArchiver archivedDataWithRootObject:item];
}

- (id)outlineView:(NSOutlineView *)ov itemForPersistentObject:(id)object {
return [NSUnarchiver unarchiveObjectWithData:object];
}

May be I must return another type of object, not NSData...

--
Quentin Mathi
email@hidden
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: 2 Cocoa Method Questions
  • Next by Date: Re: Why?
  • Previous by thread: Re: Vertical Split View...
  • Next by thread: Re: Why?
  • Index(es):
    • Date
    • Thread