swarm-support
[Top][All Lists]
Advanced

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

[Swarm-Support] sending messages with parameters in ModelSwarm


From: Eliezer Gurarie
Subject: [Swarm-Support] sending messages with parameters in ModelSwarm
Date: Fri, 07 Mar 2003 18:17:43 -0800
User-agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.1) Gecko/20020826

Dear List,

I am a new Swarm user with a quick tactical programming question:  Can I send a message in my Actionlist that depends on a parameter?

In my Action list I would like to perform a "rearrangement" of a Discrete2D object "preyspace" - based on a paramater "preyProb" like so:

[modelActions createActionTo: preyspace       message: M(rearrange: preyProb)]
;

where "rearrange" is a standard method that takes a float "p":
- rearrange: (float)p

the compiler responds with:   ModelSwarm:133: parse error before before: ")"

Does Swarm just inherently forbid passing methods with parameters in the ActionList?  Do I have to define the rearrange somewhere earlier (though it feels like this is the most natural place to tell it to do the rearrange?)

thanks,
elie

****************
Eliezer Gurarie
Quantitative Ecology and Resource Management
University of Washington
Seattle, WA 98195
reply via email to

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