[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: getCurrentTime() broken ?
From: |
Glen Ropella |
Subject: |
Re: getCurrentTime() broken ? |
Date: |
Thu, 27 Mar 1997 18:15:36 -0700 |
Sven N. Thommesen wrote:
I have perused the documentation for Swarm 1.0,
especially the sections on incompatibilities,
but haven't found anything on the following issue:
In 1.0.x, if one calls -getCurrentTime() prior to
starting the simulation running, one now gets a
core dump with an error message to the effect that
no activity is currently active.
In the beta version, the call just returned correct
time, namely 0.
I'd GREATLY prefer if the old behavior was reinstated;
a core dump seems kinda rude ...
Alternatively, how should I now code things to avoid
the core dump?
Sven
Hmmm. You shouldn't just get a core dump. You should get a message
telling you that those macros are not valid if the activity is not
running.
Try using the published message to anything that inherits from
"ScheduleActivity". As long as the activity has been created properly,
this should give you whatever value is in the variable.
BTW, I don't think we should go back to having valid macros before the
activity is started. The whole idea is to have an "out of context"
message
when the macro is used out of context. However, it might be open to
debate as to whether or not, when the activity is "stopped" (as opposed
to
"initialized" ), the macro report the last valid time.
--
+-------------------------------------------------------------------------+
|glen e. p. ropella (address@hidden)
| |
|Hive Drone, SFI Swarm Project | Hail
Eris! |
|http://www.trail.com/~gepr/home.html
| |
+-------------------------------------------------------------------------+