• 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
UN-caching outline autosaved items
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re-sizing columns in NSBrowser
      • From: email@hidden
References: 
 >Re: Problems printing graphics with transparent backgrounds (From: Gideon King <email@hidden>)

  • Prev by Date: Re: OT: Categories and alloc.
  • Next by Date: Re: Recognizing standard about box
  • Previous by thread: Re: Problems printing graphics with transparent backgrounds
  • Next by thread: Re-sizing columns in NSBrowser
  • Index(es):
    • Date
    • Thread