Hi, I needed access some object in each iteration of a PeriodicalExecuter's function but I didn't want to use global variables. So I modified the definition of initialize method of PeriodicalExecuter class declaration adding a new parameter "data":
var PeriodicalExecuter = Class.create({ initialize: function(callback, frequency, data) { this.callback = callback; this.frequency = frequency; this.currentlyExecuting = false; this.data = data; ... Then I could retrieve this object through the pe parameter of the function called every iteration through pe.data. Would be useful to implement officially this? There is any reason to don't do it? Even, I think I could declare a subclass of PeriodicalExecuter like PeriodicalExecuterParam or so. What do you think? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype: Core" group. To post to this group, send email to prototype-core@googlegroups.com To unsubscribe from this group, send email to prototype-core-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-core?hl=en -~----------~----~----~----~------~----~------~--~---