swarm-support
[Top][All Lists]
Advanced

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

Re: Dropping or cleaning a schedule


From: Roger M. Burkhart
Subject: Re: Dropping or cleaning a schedule
Date: Tue, 24 Jun 1997 20:20:49 -0500

Rob -- glad to hear you found what was causing your crash before; it does
make sense that cleaning up a schedule could cause a still-unterminated
activity to crash, and by terminating the activity first you were able
to get the cleanup to work.  There's no user accessible way to find out
what activities are currently processing a schedule (the same schedule
could potentially be traversed by many different activities in many
different places) but we may at least be able to generate some better
messages when a schedule is cleaned out from underneath a remaining
activity.

On your question about terminating within a model swarm:

> This solves my problem.  However, I would ideally like  to control the
> termination of the schedule activity from a message invoked in the
> observer swarm.  However, the message:
>   [getCurrentScheduleActivity() terminate];
> will not work because the observer swarm messages are activated by an
> activity executing a display schedule in the observer swarm.  Is there a
> way for a schedule object to reveal the activities controlling it.  I
> could then send a terminate to those activities from the observer
> swarm.  Also, I seem to have trouble reactivating a schedule in the
> modelswarm from the observer swarm.  Is there a way to do this?  Or do I
> have to always do it from the model swarm.

When you activate a schedule inside a swarm ([aSchedule activateIn: aSwarm])
the return value from activateIn: is the activity that was created.  If
you save this object id value someplace you should be able to send
terminate to that activity later on.  You can't get the activity directly
from the schedule, but as long you save the activity that was created you 
can still send messages to it.

On reactivating a schedule inside the model swarm, you should be able to
activate the schedule from pretty much any place so long as you have the id
of the swarm you want to activate it within.  I've done it even from a main
program when the observer swarm wasn't running either.  So I'm not
sure why there would be a problem; you might try just executing a scheduled
action in the observer swarm that just activates a simple schedule in the
model swarm that maybe prints some debug messages.  Make sure when you
schedule in the model swarm it's at a time that is at least as great as the
current time.
--
Roger Burkhart


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