NSOutlineView setAutosaveExpandedItems
NSOutlineView setAutosaveExpandedItems
- Subject: NSOutlineView setAutosaveExpandedItems
- From: nick briggs <email@hidden>
- Date: Mon, 17 Apr 2006 11:31:46 +0100
Im trying to get my outline view to work with
setAutosaveExpandedItems, using the code listed below
[item timeStamp] returns a unique NSString (used extensively
throughout my app)
both datasource methods are called and I have verified that the
timestamps are properly archived and unarchived.... however the
outlineviews expanded state is not restored.
incidentally if i archive and unarchive the actual items, rather than
the items timestamps i get the same issue, I would not want to do
that as the items are complex and my would be inefficient, however I
am led to believe by the docs that it should work.
Any ideas? I can find no sample code with this working.
Thanks in advance
Nick
-------
- (void)awakeFromNib
{
...
[_outlineView setAutosaveName:__AUTOSAVE_NAME__];
[_outlineView setAutosaveExpandedItems:TRUE];
...
}
- (id)outlineView:(NSOutlineView *)outlineView
itemForPersistentObject:(id)object
{
id item = [NSKeyedUnarchiver unarchiveObjectWithData:object];
}
- (id)outlineView:(NSOutlineView *)outlineView
persistentObjectForItem:(id)item
{
return [NSKeyedArchiver archivedDataWithRootObject:[item timeStamp]];
}
-----------
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden