Saving expanded state of OutlineView
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 unarchiveObjectWith
Data: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.