diff -r e9f7ba4718e1 -r 3eb7be1dd7b6 Source/Piece.m --- a/Source/Piece.m Fri Mar 07 11:43:02 2008 -0800 +++ b/Source/Piece.m Mon Mar 10 17:30:57 2008 -0700 @@ -40,20 +40,11 @@ } -- (id) initWithCoder: (NSCoder*)decoder +- (id) copyWithZone: (NSZone*)zone { - self = [super initWithCoder: decoder]; - if( self ) { - self.imageName = [decoder decodeObjectForKey: @"imageName"]; - // (actual image (self.contents) was already restord by superclass) - } - return self; -} - -- (void) encodeWithCoder: (NSCoder*)coder -{ - [super encodeWithCoder: coder]; - [coder encodeObject: _imageName forKey: @"imageName"]; + Piece *clone = [super copyWithZone: zone]; + clone.imageName = self.imageName; + return clone; }