The documentation for PE shows this sort of construct used to stop the
executer from inside itself:
new PeriodicalExecuter(function(pe){
if (foo == bar) {
pe.stop();
}else{
doSomething();
}
},5);
Now my other big use-case for this is that I need it to run until I
ask it to stop from the outside, and if I do this, that seems also to
work:
var pe; //global, or at least in the current outside scope
pe = new PeriodicalUpdater(function(){
doSomething();
},5);
$('bar').observe('click',function(evt){ pe.stop(); });
So do these two uses represent two different ways to use the stop
method? Or am I looking at the 1.7 documentation and still using 1.6
(which I am)?
Thanks for any clarification,
Walter
--
You received this message because you are subscribed to the Google Groups "Prototype
& script.aculo.us" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en.