• 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
Re: added table column won't show because of autosaving
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: added table column won't show because of autosaving


  • Subject: Re: added table column won't show because of autosaving
  • From: John Bishop <email@hidden>
  • Date: Fri, 28 Apr 2006 13:28:49 -0500

Matt Neuburg <email@hidden> said:

>Okay, let me open up the question to people who *have* thought about it and
>tried it.
>

Come on, Matt... this isn't too hard.

There is extraneous autosaved column data in your users' preferences files and
you should be able to a) detect it and b) correct it if you wish.  I suggested
trying:

NSString *autoSaveKey =
    [NSString stringWithFormat:@"NSTableView Columns %@", autosaveName];
[[NSUserDefaults standardUserDefaults] removeObjectForKey:autoSaveKey];

and maybe also:

NSString *autoSaveKey =
    [NSString stringWithFormat:@"NSTableView Sort Ordering %@", autosaveName];
[[NSUserDefaults standardUserDefaults] removeObjectForKey:autoSaveKey];

I thought that was a pretty helpful head-start to solve your problem.  You may
have to retrieve the autosaved data to see if it's really wrong - maybe like
this:

NSArray *columnStuff =
    [[NSUserDefaults standardUserDefaults] objectForKey:autoSaveKey];
if ([columnStuff count] < 3) { /* Kill or fix the bad column stuff */ }

It could get a bit more sticky if you're using autosaved user defaults outside
the user domain, or there's something "special" about autosaved data that
prohibits you from retrieving it as described above.  I doubt it though.  You
can do this.  And I'm done with it.

John
 _______________________________________________
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: Binding Text Field to Show Time Interval?
  • Next by Date: Re: Bug in QDGetCursorData on Intel?
  • Previous by thread: Re: added table column won't show because of autosaving
  • Next by thread: Best Place To Save States
  • Index(es):
    • Date
    • Thread