swarm-support
[Top][All Lists]
Advanced

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

Re: Can a Swarm instance be treated like a SwarmObject instance?


From: Paul E. Johnson
Subject: Re: Can a Swarm instance be treated like a SwarmObject instance?
Date: Thu, 22 Apr 1999 14:27:01 -0500

Ken Cline wrote:
> 
> On Thu, 22 Apr 1999, William S. Shu wrote:
> 
> I presume the `createBegin:' fragment below is from the
> SmlSwarm.m.  If so, why are you assigning the pointer
> returned from `[super createBegin: aZone]' (that is,
> `[Swarm createBegin: aZone]') to a SmlObject pointer?
> 
> (As I recall) By default the ivars for ObjC objects will
> have a protected access level and hence the compiler is
> correct to warn you about trying to access SmlObject ivars
> from a SmlSwarm method.
> 
> My apologies if I've mis-interpreted what you are trying to
> do.
> 

That createBegin language is in the TemplateModelSwarm. 
I imagine that is where it came from.    See Here:

+createBegin: (id) aZone {
  TemplateModelSwarm * obj;
  id <ProbeMap> probeMap;

  obj = [super createBegin: aZone];
...........

I've often wondered why it is done that way.

What would you think he should do instead in the case of his "nested"
Swarm classes?  I wonder if it ought to directly call the Swarm class in
the SmlSwarm?  I mean include Swarm.h and then do [Swarm createBegin:
aZone] ?

This is interesting because, like other examples I've stumbled into
lately, one has to alter/change some of the boilerplate code from the
swarmapps to get jobs done.

-- 
Paul E. Johnson                       email: address@hidden
Dept. of Political Science            http://lark.cc.ukans.edu/~pauljohn
University of Kansas                  Office: (785) 864-9086
Lawrence, Kansas 66045                FAX: (785) 864-5700

                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.



reply via email to

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