[Prototype-core] Re: Suggested addition to Function Methods: .repeat(seconds[, arg...])

2009-06-24 Thread Tobie Langel
You might also want to look at the already existing PeriodicalExecuter. Any implementation of a Function#repeat API should take this in account. On Jun 24, 2:55 pm, joe t. thooke...@gmail.com wrote: Only suggestion i can think of is that your method strongly implies a requirement that

[Prototype-core] Re: Suggested addition to Function Methods: .repeat(seconds[, arg...])

2009-06-24 Thread Robert Kieffer
I can't say I'm a big fan of this. For several reasons. First, it's just a cosmetic replacement for setInterval(myfunction (...).bind(), ...) which simply isn't all that bad. Second, I'm not a fan of setInterval in general. I've seen some rather nasty behavior with calls queuing up if the

[Prototype-core] Re: Suggested addition to Function Methods: .repeat(seconds[, arg...])

2009-06-24 Thread Rick Waldron
This is fantastic feedback - thanks! On Wed, Jun 24, 2009 at 9:55 AM, Robert Kieffer bro...@gmail.com wrote: I can't say I'm a big fan of this. For several reasons. First, it's just a cosmetic replacement for setInterval(myfunction (...).bind(), ...) which simply isn't all that bad.

[Prototype-core] Re: Suggested addition to Function Methods: .repeat(seconds[, arg...])

2009-06-24 Thread Rick Waldron
I've subbed my implementation with your to do some use-case testing. I'll report back anything of interest as I go along. Rick On Wed, Jun 24, 2009 at 10:49 AM, Rick Waldron waldron.r...@gmail.comwrote: This is fantastic feedback - thanks! On Wed, Jun 24, 2009 at 9:55 AM, Robert Kieffer

[Prototype-core] Re: Suggested addition to Function Methods: .repeat(seconds[, arg...]) -- Revised from Robert's version

2009-06-24 Thread Rick Waldron
I made a few modifications to your version, allowing repeat() to behave like delay() with regard to arguments I've posted a demo here: http://jsbin.com/ekone All the output is to the firebug console... i've included fbug lite just in case Rick On Wed, Jun 24, 2009 at 10:50 AM, Rick

[Prototype-core] Re: Suggested addition to Function Methods: .repeat(seconds[, arg...])

2009-06-24 Thread Tobie Langel
Just to clarify the above: Prototype Core already contains a similar functionality: PeriodicalExecuter. The API is different but the functionality is the same. I'd strongly suggest looking into combining both approaches if you want your suggestion to be included in core and not just stay a

[Prototype-core] Re: Suggested addition to Function Methods: .repeat(seconds[, arg...])

2009-06-24 Thread Robert Kieffer
FWIW, PeriodicalExecuter has always struck me as a bit of a wart on the Prototype API. The name and usage are awkward, and it's functionality really feels like something that should just be a Function extension, as we're seeing in this thread. I'm assuming it's presence is mostly a legacy thing.

[Prototype-core] Re: Suggested addition to Function Methods: .repeat(seconds[, arg...])

2009-06-24 Thread Rick Waldron
Tobie, I had in fact looked into PeriodicalExecuter and to be perfectly honest, with no offense intended, i think it's usage syntax is hideous which is what led me to writing my own Function.prototype method instead, taking inspiration from .delay() It doesnt matter to me whether or not

[Prototype-core] Re: Prototype 1.6 security exception in firefox 2.0.0.20 in XPath code

2009-06-24 Thread Scott Windsor
Thanks, I am using jquery. I'll give this a try! - scott On Jun 24, 7:17 am, upi teich...@gmx.de wrote: I had the very same problem and solved it by changing the order: 1) include jquery 2) setting jQuery.noConflict(). 3) include prototype scriptaculous On 13 Jun., 04:00, swindsor

[Prototype-core] Re: Suggested addition to Function Methods: .repeat(seconds[, arg...])

2009-06-24 Thread Tobie Langel
Hi Rick, hi Robert. Fully agree regarding PE. It does however handle issues a regular setInterval doesn't (as you mentioned). It's clearly an area which would need refinement, but that's better done in a backwards compatible way. Personally, I'd love to see PE implemented as a method of