• 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 setAutosaveExpandedItems
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Prev by Date: Re: Universal Binaries with 10.2.8 vs 10.4 conditional compiling
  • Next by Date: : Correction: NSOutlineView setAutosaveExpandedItems
  • Previous by thread: Re: Referencing objects instantiated in Interface Builder
  • Next by thread: : Correction: NSOutlineView setAutosaveExpandedItems
  • Index(es):
    • Date
    • Thread