Re: added table column won't show because of autosaving
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