Re: [NSKeyedUnarchiver decodeObjectForKey:] bug during call to [NSDocumentController openUntitledDocumentAndDisplay: error:]

  • 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
    >
    >
previous month september 2007 next month
MTWTFSS
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
Go to today