--- Begin Message ---
Subject: |
unable to deliver mail |
Date: |
Fri, 12 Dec 1997 09:16:19 +1100 |
This message was returned to you for the following reasons:
Cannot parse recipient: Wengui address@hidden
The original message follows.
Content-type: message/rfc822
Received: from ccMail by ccgate.forestry.tas.gov.au
(IMA Internet Exchange 3.0 Enterprise Beta 1) id 000014A5; Fri, 12 Dec 97
09:16:18 +1100
Mime-Version: 1.0
Date: Thu, 11 Dec 1997 21:50:41 +1100
Message-ID: <address@hidden>
From: address@hidden
Subject: Displaying before running revisited
To: address@hidden
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Content-Description: cc:Mail note part
A few months ago there was a discussion on how to display the state of
the world at time 0. Sven showed how to break down and activate
schedules to achieve this. I'm trying to make a "movie" of my sim and
need to capture the screen at t=0, but am having trouble getting this to
work :-(.
The sim displays t=0 then immediately updates the screen for t=1 before
stopping. My observerswarm activateIn and buildActions methods are as
follows:
-activateIn: (id) swarmContext {
// put self (observer swarm) on the schedule of the GUI swarm
[super activateIn: swarmContext];
[startDisplaySchedule activateIn: self ]; // <-- update the display
[startHaltingSchedule activateIn: self ]; // <-- halt & wait for
'go'
// start the activity for the model swarm
[modelSwarm activateIn: self];
// start the display schedule
[displaySchedule activateIn: self ];
[tkEventSchedule activateIn: self ];
return [self getSwarmActivity];
}
-buildActions {
[super buildActions];
[modelSwarm buildActions];
displayActions = [ActionGroup create: [self getZone]];
[displayActions createActionTo: worldRaster message: M(erase)];
[displayActions createActionTo: [modelSwarm getWorld] message:
M(drawSelfOn:):(id) worldRaster];
[displayActions createActionTo: worldRaster message: M(drawSelf)];
[displayActions createActionTo: self message: M(doStats)];
[displayActions createActionTo: probeDisplayManager message:
M(update)];
displaySchedule = [Schedule createBegin: [self getZone]];
[displaySchedule setRepeatInterval: displayFrequency];
displaySchedule = [displaySchedule createEnd];
[displaySchedule at: displayFrequency-1 createAction: displayActions];
startDisplaySchedule = [Schedule create: [self getZone]];
[startDisplaySchedule at: 0
createAction: displayActions ];
tkEventSchedule = [Schedule createBegin: [self getZone]];
[tkEventSchedule setRepeatInterval: displayFrequency];
tkEventSchedule = [tkEventSchedule createEnd];
[tkEventSchedule at: displayFrequency-1
createActionTo: controlPanel
message: M(doTkEvents)];
startHaltingSchedule = [Schedule create: [self getZone]];
[startHaltingSchedule at: 0
createActionTo: controlPanel
message: M(setStateStopped)];
return self;
}
Can anyone explain to me why this doesn't work? I thought I was
following Sven's recipe, but I must be missing something fundamental.
Thanks in advance,
--
Phil Knight
==================================
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.
==================================
--- End Message ---