swarm-support
[Top][All Lists]
Advanced

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

Re: getCurrentTime


From: glen e. p. ropella
Subject: Re: getCurrentTime
Date: Sat, 29 Mar 1997 12:09:34 -0700

Sven Thommesen writes:
 > I will in a minute -- seems I don't have much choice!
 > Your less-terse explanation made some sense (more than
 > your previously very terse one, anyway!)
 > 
 > But I'd have greatly preferred if existing code hadn't
 > gotten broken like this -- why not have those messages,
 > which the macro evidently actually calls, return t=0
 > or t=-1 or somesuch if an activity is not activated,
 > rather than the brutal 'InvalidCombination raiseEvent'?

Are you saying that you *don't* get the message about 
calling getCurrentTime() out of context?  Also, the function
is defined as:


extern id _activity_context_error( char *macroName )
{
  if ( ! _activity_current )
    raiseEvent( InvalidOperation,
"> %s(): there is no currently running activity from which\n"
"> to obtain requested activity context information.  The context query\n"
"> macros are available only within a compiled action being executed under\n"
"> a running activity.  They are not available when the activity is stopped\n"
"> or otherwise inactive.  This includes any external probe request.\n",
      macroName );

Which says you should be getting an "InvalidOperation" not an 
"InvalidCombination."

 > (I'd also point out that this little item doesn't seem
 > to have made it into the docs re: incompatibilities.)

Yep, you're right about that.  Sorry.

 > So, let me see, I'm making these macro calls before
 > saying 'go' -- what activity object should I send 
 > messages to? [Think Heatbugs here.]
 > 
 > And and what will the likely result be ... ?

Well, that's a good question.  I would suggest either
the modelSchedule or the displaySchedule.  Maybe the 
best thing would be to do the following from inside either
the modelSwarm or the observerSwarm:

  [[self getActivity] getCurrentTime];

Since a SwarmActivity is subclassed from a ScheduleActivity,
it should accept this.

Now, what you'll get ... I don't know.  But, I suspect you'll
get 0.

 > As for relativity and religion -- no, I don't mind at all!
 > Always a joy to have a little repartee with interesting
 > and/or intelligent people out there. That's a major benefit
 > of the Internet! Despite being religiously challenged,
 > I think I can take a reference or two to God without having
 > a fit. And we all know the Centauri are swell people, unless
 > you ask the Narn of course :-)

You Babylon 5 fans confuse me.  You all seem to be relatively
intelligent and yet you claim that B5 is a good show.... With
Transylvanian-like/too-much-mousse-usin' life from Alpha Centauri,
silly gargantuan wormhole stabilization devices, and Bruce Boxlitener
(or however you spell it), I just can't understand why you'd like the
show so much...  But, then, I guess with the wasteland that is TV,
it's not hard to outstrip everything else that's on.

glen
p.s. If anybody doesn't recognize that previous paragraph as 
intentionally provocative, then let me assure you that it is. [grin]


reply via email to

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