diff -r e9f7ba4718e1 -r af9b2b929b03 Source/Piece.m --- a/Source/Piece.m Fri Mar 07 11:43:02 2008 -0800 +++ b/Source/Piece.m Wed Mar 12 15:51:32 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; }