On 13.12.2008, at 6:16, Michael Ash wrote:
When you get to an object, you can simply encode it using [coder encodeObject:obj forKey:@"key"]. Of course obj must implement NSCoding as well, otherwise this will not work. For your own classes, you'll need to implement NSCoding for everything that will get encoded. CALayer already implements NSCoding so there's nothing tricky for that one. Mike
Aha, so I will need to do the following only: -(void)encodeWithCoder:(NSCoder *)coder { [coder encodeInt:size forKey:@"size"]; [coder encodeInt:impacts forKey:@"impacts"]; [coder encodeObject:shipImageLayer forKey:@"shipImageLayer"]; } mmm Good Thanks for your reply. G _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com