Problem archiving/unarchiving object graph containing NSMutableArray

  • Hi experienced developers!

    I'm trying to archive/unarchive an object graph using
    archivedDataWithRootObject: aRootObject.
    aRootObject has two instance variables of type NSMutableArray. Each
    mutable array contains customs objects of different types (subclasses
    of NSObject). For aRootObject and the custom objects in the mutable
    arrays I have implemeted encodeWithCoder and initWithCoder. When
    archiving encodeWithCoder gets called for the root object but not for
    the custom objects in the arrays. Same when unarchiving. Am I missing
    something?

    /wamund
  • You're almost certainly going to need to post some code for us to
    figure it out.

    On 21 Nov 2008, at 13:12, Mikael Wämundson wrote:

    > Hi experienced developers!
    >
    > I'm trying to archive/unarchive an object graph using
    > archivedDataWithRootObject: aRootObject.
    > aRootObject has two instance variables of type NSMutableArray. Each
    > mutable array contains customs objects of different types
    > (subclasses of NSObject). For aRootObject and the custom objects in
    > the mutable arrays I have implemeted encodeWithCoder and
    > initWithCoder. When archiving encodeWithCoder gets called for the
    > root object but not for the custom objects in the arrays. Same when
    > unarchiving. Am I missing something?
    >
    > /wamund