+1 for optional function -Nicolas On 8/29/07, Tom Gregory <[EMAIL PROTECTED]> wrote: > > I was thinking about this the other day as I was going through > Christophe's book ... I know I'm resurrecting an old thread, but stay > with me. > > Instead of adding a "maxFrequency" option, (really, "maxDelay"), > perhaps it would be more extensible to allow "decay" to accept a > function as well as a number. Maybe pass the frequency and last > decay value as parameters, have it return the delay until the next > request. > > Thoughts? > > > TAG > > On Aug 21, 2007, at 11:06 AM, Chris Kampmeier wrote: > > > > > Hello, > > > > If anybody has a few cycles to spare, I could use some reviewers for a > > patch I just submitted. It adds a "maximum frequency" option to > > Ajax.PeriodicalUpdater's decay functionality, so you can do: > > > > new Ajax.PeriodicalUpdater('widgetList', '/widgets.json', > > { frequency: 1, decay: 2, maxFrequency: 5 }); > > > > When the response is not modified, the time between requests will only > > decay to 5 seconds at the most (after increasing from 1 to 2, and then > > to 4). I've needed something like this almost every time I've used > > Ajax.PeriodicalUpdater to prevent decayed frequencies on the order of > > minutes. > > > > http://dev.rubyonrails.org/ticket/8184 > > > > Thanks, > > Chris Kampmeier > > > > > > > > > > > >
--~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/prototype-core?hl=en -~----------~----~----~----~------~----~------~--~---