Re: NSCopying is manual labor
Re: NSCopying is manual labor
- Subject: Re: NSCopying is manual labor
- From: Ricky Sharp <email@hidden>
- Date: Wed, 30 Mar 2005 16:30:24 -0600
On Mar 30, 2005, at 4:19 PM, M. Uli Kusterer wrote:
At 5:54 Uhr -0500 30.03.2005, Adam wrote:
I am just beginning to read about NSCopying, but from what I
understand I have to implement a copyWithZone method in my model
class , init a new object, and by hand copy all 20 instance variables
from the current object into the new object. Then since two of my
instance variables are themselves model objects I need to repeat this
process over again for each class. This is a lot of work. Is there
something I am missing that can just copy an entire object and its
contents in its current state, or am I on the right track to do it
manually like this?
Have you checked out Accessorizer? I think it will auto-generate a
copyWithZone: method.
The version I have (0.9.9u) does generate code for the NSCoding
(encodeWithCoder: and initWithCoder:) protocol, but not NSCopying.
Time to contact Kevin and submit a feature request :)
___________________________________________________________
Ricky A. Sharp mailto:email@hidden
Instant Interactive(tm) http://www.instantinteractive.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden