UN-caching outline autosaved items
UN-caching outline autosaved items
- Subject: UN-caching outline autosaved items
- From: Gideon King <email@hidden>
- Date: Sat, 29 Jun 2002 09:55:42 +0800
I have an outline view which I have set up to autosave, which works
fine. The data it is representing is initially read from the file
system. I want to be able to update the saved data when the
files/folders change, but it appears that the persistent data is too
persistent - I can't get rid of it!
What I have tried to do so far is to unset all the autosave settings,
reset and reload my datasource (which does indeed find the new files I
have created). I then remove the defaults that the autosave settings
have created, and turn the autosave features on again - like so:
[selectionOutlineView setAutosaveName:nil];
[selectionOutlineView setAutosaveExpandedItems:NO];
[selectionOutlineView setAutosaveTableColumns:NO];
[MyDataSource reset];
[selectionOutlineView reloadData];
[[NSUserDefaults standardUserDefaults]
removeObjectForKey:@"NSOutlineView Items
AdornmentSelectorOutlineViewExpanded"];
[[NSUserDefaults standardUserDefaults]
removeObjectForKey:@"NSTableView Columns
AdornmentSelectorOutlineViewExpanded"];
[[NSUserDefaults standardUserDefaults] synchronize];
[selectionOutlineView
setAutosaveName:@"AdornmentSelectorOutlineViewExpanded"];
[selectionOutlineView setAutosaveExpandedItems:YES];
[selectionOutlineView setAutosaveTableColumns:YES];
[[NSUserDefaults standardUserDefaults] synchronize];
What happens is that when I restart the app, it still only shows the
items that were previously there. Any ideas why this might be happening?
Thanks
Gideon.
_______________________________________________
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.