swarm-support
[Top][All Lists]
Advanced

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

Various comments


From: Benedikt Stefansson
Subject: Various comments
Date: Mon, 19 Aug 1996 16:23:19 -0700

Hi Sven et al,

Just my five cents worth: 

Let's start using the file read and object read objects first
before we start talking about protocols, it is not clear to me
at this stage if there is any need for users to standardize on how
they initialize their model objects internally. It is really a question
of style and convenience.

I have only written simulations where model object parameters are set
once at the creation stage, through a method call. Let's call this
server push a la Netscape. Maybe in the future I'll write a simulation
where parameters are read in from disk more than once, and then it might
be a good idea to have objects update parameters by calling a super
object themselves. Lets call that client pull. The latter would probably
be harder to debug, since there are more ways for things to go wrong.
Since a super object has to read in the pameters anyway, my hunch is
that the 'cleaner' way is to use server push to pass parameters.

Second comment. 

Sven wrote:

"Rather than "re-assigning" objects during creation, e.g. in 
this case:

        heatDisplay = [Value2dDisplay createBegin: aZone];
          [heatDisplay setParameter: parameterValue];
        heatDisplay = [heatDisplay createEnd]; 
<...>"

There seems to be small misunderstanding here. 

The object heatDisplay is not being reassigned. 

The first line creates the object from the class Value2dDisplay. The
second line calls the newly created instance of Value2dDisplay, thus
using its instance name. It is common in Objective-C to write 'anObject'
when referring to an instance and 'AnObject' when referring to it's
class. The final line is really only a matter of style. The createEnd
method does nothing but return self, i.e. return the object that we have
created. 

Using the indermediate object as you suggested would be pointless.

Greetings from LA,
-Benedikt.

----------------
Benedikt Stefansson                 address@hidden
Center for Computable Economics     Tel. (310) 825-1777
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]