[Rails-spinoffs] PeriodicalExecuter passing variables to the callback function

2005-12-12 Thread Steven Albarracin
I trying to pass a variable to the call back function of when utilizing the PeriodicalExecuter function ex. new PeriodicalExecuter(refresh, 10); works but new PeriodicalExecuter(refresh(id), 10); works once then errors after the 10 seconds, I get this.callback is not a function

Re: [Rails-spinoffs] PeriodicalExecuter passing variables to the callback function

2005-12-12 Thread John Butler
The difference is that in the first example you are passing a reference to the function variable. In the second example you are actually executing the function ( which is why it works once ) and the returned result of the refresh() function is then passed to PeriodicalExecuter. ( which is