swarm-support
[Top][All Lists]
Advanced

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

Re: modelProbeMap in simpleExperSwarm.m


From: Sven N. Thommesen
Subject: Re: modelProbeMap in simpleExperSwarm.m
Date: Sat, 12 Sep 1998 19:16:22 -0500

At 02:08 PM 9/12/1998 +0100, Zafar Iqbal wrote:
>Hi,
>thanks for your help - much appreciated.
>
>Looking through the tutorial and my 
>own code I am still unable to resolve the display problem. 
>Note I now have my prog along the ObserverBug2 framework.
>The worldRaster is displayed but no agents. The program 
>gets 'stuck' at the line (see below for complete code)
> agentDisplay = [agentDisplay createEnd];
>
>No error is produced the prog just hangs up. I can't see 
>why this is. It may possibly be something to do with the
>[controlPanel setStateStopped]; command because in my code 
>it is commented out but the program still stops. If I 
>uncomment it I need to press start twice and the 
>worldRaster widget isn't displayed at all.
>
>I'm using the binary install of swarm-1.1

Zafar,

you dont show your -buildActions and -activateIn: methods, but if you
create actions in the same order you created the objects, let me suggest
you reverse the order of 'agentDisplay' and 'plotDisplay'. They are both
created to display on the same raster ('worldRaster'), so the one that
displays last will wipe out the one that displays first. If you want to
make sure you always see the bugs, make 'agentDisplay' display last. If you
really need to see both agents and plotlists, you need to create separate
rasters to show them. Or, have each type of object display nothing if there
is no agent/plotlist on a given square. 

Second, do upgrade to 1.3.

Third, it might be useful to put newlines (\n) at the end of your printf
strings.

Fourth, yes if you uncomment the -setStateStopped call then the program
halts right there; since the worldRaster is created later in the program it
won't be created until after the user has hit 'start' on the control panel.
(I have several calls to setStateStopped in my own app, to give the user
several opportunities to set parameters. This is not a problem.)

Good luck,
Sven


                  ==================================
   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]