swarm-support
[Top][All Lists]
Advanced

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

Re: How to Replace actions in schedules ?


From: Paul E Johnson
Subject: Re: How to Replace actions in schedules ?
Date: Wed, 06 Jun 2001 14:55:38 -0500

I've never addressed a schedule with an index in the way you are doing
it. 

WHen you say "replace" I am a bit confused about what you mean, because
I would usually think of it as a set of scheduled actions being
completed, and then another set begins.  I think a dynamic schedule
would be the easiest route to take, but if you don't like that, I think
the remove method in the Schedule class will let you do what you want. 
The key thing is that the createAction methods all return an object, and
then if you pass that returned object to the remove method, it will
remove it.  Then you can add another action to the schedule. 


Narjes BELLAMINE-BEN SAOUD wrote:
> 
> Hello,
> 
> I am developing an application using SWARM and java in Windows
> environment.
> 
> I would like to REPLACE some scheduled methods by new ones !
> 
> I have acces to the methods that are being scheduled as fellows:
> 
>     MapIndex scheduleIndex = schedule.mapBegin (getZone ());
>     Action action1 = (Action) scheduleIndex.next ();
>     System.out.println ("First:"+scheduleIndex.getKeyValue () + "
> action: " + action1);
>     System.out.println (((ActionTo) action1).getMessageSelector
> ().getSignature ());
>     ...
> 

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