Hi, I was able to pause and resume PeriodicalExecuter without using your
PeriodicalExecuter class.  I ended up using the standard
PeriodicalExecuter#stop method and resumed the PeriodicalExecuter by
delaying the execution for 5 seconds using the Function#delay method and by
binding it to the PeriodicalExecuter object using the Function#bind method.
I still don't understand Prototype (in specific) and Javascript (in general)
as well as I want to, but taking a look at your code helped me accomplish
what I needed to do. Thanks.

On Wed, Feb 10, 2010 at 12:23 AM, Радослав Станков <[email protected]>wrote:

> You can use the standard PeriodicalExecuter#stop /
>
> http://api.prototypejs.org/language/periodicalexecuter.html#stop-instance_method
> / method for stopping.
>
> And one undocumented method PeriodicalExecuter#registerCallback /
>
> http://github.com/sstephenson/prototype/blob/master/src/lang/periodical_executer.js#L31
> / start it again. It's strange why this method isn't documented at
> all. ( You could fire a ticket for that )
>
> One thing to know though is that registerCallback don't check if the
> timer was started ( and I don't like registerCallback as method name,
> I always forget it :) So you could do:
>
> <code>
> PeriodicalExecuter.addMethods({
>  start: function(){
>    if (!this.timer) this.registerCallback();
>  }
> });
> </code>
>
> and have PeriodicalExecuter#start method :)
>
> --
> 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]<prototype-scriptaculous%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/prototype-scriptaculous?hl=en.
>
>

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

Reply via email to