swarm-support
[Top][All Lists]
Advanced

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

Re: Displaying before running: failure


From: rmb
Subject: Re: Displaying before running: failure
Date: Sun, 13 Jul 1997 16:16:24 -0600

> Roger, I didn't understand your answer. Could you please post some
> code that demonstrates how I can schedule something that will execute
> at times 20, 23, 26, 29, etc? 3t + 20. What I want to do is just make
> a schedule that has a repeat interval of 3 and starts at time 20.

  id  startSchedule, repeatSchedule;

  startSchedule = [Schedule create: aZone];

  repeatSchedule = [Schedule createBegin: aZone];
  [repeatSchedule setRepeatInterval: 3];
  repeatSchedule = [repeatSchedule createEnd];
  [repeatSchedule at: 0 createActionTo: someObject message: M(doSomething)];

  [startSchedule at: 20 createActionTo: repeatSchedule
     message: M(activateIn:) : aSwarm];
  [startSchedule activateIn: aSwarm];

The doSomething message to someObject should execute at the frequency you
asked for.  The base time of a repeating schedule is always the time of its
initial activation, so we just schedule the activation at time 20.

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