Print

Print


Tony Bigbee wrote:
> Is there a recommended way to dynamically remove specific Steppable
> objects from the schedule?

I've been doing:

entity.setStoppable( schedule.scheduleRepeating(entity) );

...which then allows me to do.....

        if( this.stoppable != null )
{
      this.stoppable.stop();
}

(you'll need to define stoppable and setStoppable() in your entity class)

I had a quick look at the Mason scheduler code, but couldn't figure out
whether this truly takes the entity off the schedule (and, hence,
whether its any more efficient than your current approach). I'll have
another look when I have time (if Sean doesn't provide a better answer
in the mean time, of course).


yours,
rob

--
Rob Alexander                   (E-mail: [log in to unmask])
Research Associate, Dept of Computer Science, The University of York,
York, YO10 5DD, UK
Tel: 01904 432792       Fax: 01904 432708