swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Copy and initSeed


From: Benedikt Stefansson
Subject: Re: Copy and initSeed
Date: Mon, 02 Dec 1996 23:36:33 -0800

Thanks to Roger for clarifying the 'copy' issue. 

After experimenting with several solutions I settled on a fairly
customized set of 'copyFrom' and 'copyTo' methods in the agents in
question. I doubt that the solution would be transparent or portable,
but I would be glad to explain how it works if someone else runs into a
similar problem.

Essentially the solution was to use clone=[Class createBegin: aZone] to
get an instance of the desired class, and add a method -copyTo:
(id)clone to the class that knows about all the necessary stuff that has
to be initialized and copied over. 

This runs against Roger's suggestion that -copy messages adher to the
copy: aZone protocol, but in this case the Zone stuff was taken care of
before the copy method was to be invoked.

-Benedikt.


-- 
----------------
Benedikt Stefansson                 address@hidden
Center for Computable Economics     Tel. (310) 825-1777
Department of Economics, UCLA       Fax. (310) 825-9528
Los Angeles, CA 90095-1477          http://cce.sscnet.ucla.edu


reply via email to

[Prev in Thread] Current Thread [Next in Thread]