Re: [NSKeyedUnarchiver decodeObjectForKey:] bug during call to [NSDocumentController openUntitledDocumentAndDisplay: error:]
Re: [NSKeyedUnarchiver decodeObjectForKey:] bug during call to [NSDocumentController openUntitledDocumentAndDisplay: error:]
- Subject: Re: [NSKeyedUnarchiver decodeObjectForKey:] bug during call to [NSDocumentController openUntitledDocumentAndDisplay: error:]
- From: "Ewan Delanoy" <email@hidden>
- Date: Sat, 15 Sep 2007 14:50:28 +0200 (CEST)
- Importance: Normal
Many thanks for your help James ! Your trick allowed me to
find out at once what was going on : the obsolete object instance
was a "preference" data, stored in [NSUserDefaults standardUserDefaults ].
That piece of advice of yours will certainly be useful to me in other
situations also.
Ewan
> Probably the easiest way to find out what's going on is to
> create a new GCValue class that does nothing but implement the
> NSCoding protocol and has an empty implementation of
> initWithCoder:. You can then set a breakpoint in [GCValue
> initWithCoder:] and find the code that's trying to de-serialize it.
>
> P.S. By the way, this is generally how I support archived
> objects of obsolete classes. I create a placeholder class with
> the same name as the legacy class. Its initWithCoder: method
> essentially acts like a class cluster; it creates a new object
> with the correct replacement class and returns that instead.
>
> --
> James Bucanek
>
>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden