swarm-support
[Top][All Lists]
Advanced

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

Re: Passing parameters


From: Paul Johnson
Subject: Re: Passing parameters
Date: Mon, 10 Dec 2001 07:47:53 -0600
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.6) Gecko/20011120

Jacek Gomoluch wrote:

Hi,

just a basic question about the Swarm toolkit: I wonder if it allows to pass
parameters (e.g. an object reference) when scheduling an action. Assuming
that it does, what ist the best way to do this ?

Thanks for any help

Jacek

Jacek Gomoluch


There are different ways this can be done. It is one of the most frustrating things about learning swarm, I think, because there is such a great variety of ways to do it.

The way described in the User Guide still works! I'd suggest that as a first step. Then there is the newer way using FCall thingies. If you read the Heatbugs source, you should see a CPP flag for FAST which causes that thing to work. There is a working java example here prepared by Marcus Daniels:

http://lark.cc.ukans.edu/~pauljohn/SwarmFaq/WorkingExampleCode/java/FActionArguments.txt

The idea is that you wrap the message and arguments together in an object, then pass that to the schedule when needed.

As I understand it, the problem with the old way is that it runs slower because objects are not typed.

--
Paul E. Johnson                       email: address@hidden
Dept. of Political Science            http://lark.cc.ku.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]