swarm-support
[Top][All Lists]
Advanced

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

scheduling schedules after time 0.


From: Paul Johnson
Subject: scheduling schedules after time 0.
Date: Tue, 04 Apr 2000 10:59:53 -0500

I've gotten curious about how to schedule repeating actions that begin
after time 0.  I find this rather tricky, but after looking at a Marcus
example
http://lark.cc.ukans.edu/~pauljohn/SwarmFaq/WorkingExampleCode/objc/DynamicScheduling.txt

I think I am able to make it work.  The solution is to create a "bland"
schedule with

newSchedule=[Schedule create: self];

and then tell that newSchedule to activate the other one at the right
time, as in

 [newSchedule at: 2 createActionTo: proposalSchedule message:
M(activateIn:): self];

The actions of the proposalSchedule get inserted at the correct position
as long as the newSchedule is inserted properly into the activateIn:
method of the model swarm.

I don't understand why this works, mainly because I don't understand the
effect of creating this "bland" schedule without setting the repeat
interval or the setAutoDrop features.  Why does new schedule let me
insert things at time 2, but it will not let me do so if I set the
repeat interval when I create it, as I mistakenly tried several times:

newSchedule=[Schedule create: self setRepeatInterval: 1];

?
When newSchedule is created this way, I get the run time error saying I
cannot insert actions at time >= repeat interval.  I'm looking at
Schedule.m in the source code and I can understand why that error
happens. I don't understand why the "bland" schedule avoids it.

-- 
Paul E. Johnson                       email: address@hidden
Dept. of Political Science            http://lark.cc.ukans.edu/~pauljohn
University of Kansas                  Office: (785) 864-9086
Lawrence, Kansas 66045                FAX: (785) 864-5700

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