[Prototype-core] Re: Class.from(base) - for real class inheritance ?

2007-09-01 Thread Mislav Marohnić
On 9/1/07, Robert Katić <[EMAIL PROTECTED]> wrote: > > > I suggest this improvement for more correct OOP in Prototype. We are still discussing and working on subclassing syntax and feature. We will consider this. I've also made a patch that enhances the current inheritance system to inherit clas

[Prototype-core] Re: simulated DOMContentReady event

2007-09-01 Thread Thomas Fuchs
IMHO, "contentloaded" should be fired once, when the DOM of the initial page is completely loaded and parsed by the browser. Loading in stuff via Ajax shouldn't trigger this event. YMMV, but you can add a global ajax responder and fire a "fragmentloaded" (or so) custom event, and oberve that

[Prototype-core] Re: Class.from(base) - for real class inheritance ?

2007-09-01 Thread Robert Katić
Yes I see... But why you don't permit to override Function.prototype properties in user classes? On Sep 1, 10:57 am, "Mislav Marohnić" <[EMAIL PROTECTED]> wrote: > On 9/1/07, Robert Katić <[EMAIL PROTECTED]> wrote: > > > > > I suggest this improvement for more correct OOP in Prototype. > > We are

[Prototype-core] Re: iterable/$A

2007-09-01 Thread Robert Katić
I have another question about $A and similar. Why you prefer do this var results = []; for (var i = 0, length = iterable.length; i < length; i++) results.push(iterable[i]); instead of var length = iterable.length, results = new Array(length); for (var i = 0; i < lengt

[Prototype-core] Re: simulated DOMContentReady event

2007-09-01 Thread Nicolás Sanguinetti
On 9/1/07, Thomas Fuchs <[EMAIL PROTECTED]> wrote: > > IMHO, "contentloaded" should be fired once, when the DOM of the > initial page is completely loaded and parsed by the browser. > > ... > > I think making contentloaded too magic breaks POLS. Actually it works the other way around for me. My m

[Prototype-core] Re: simulated DOMContentReady event

2007-09-01 Thread Andrew Dupont
On Sep 1, 5:18 pm, "Nicolás Sanguinetti" <[EMAIL PROTECTED]> wrote: > Anyway, the custom event solution seems tidy enough. What do the w3c > specs say on xmlhttprequests and contentloaded, if anything? They don't. Despite its name, the "DOMContentLoaded" event is not part of any standard. --~--

[Prototype-core] Re: iterable/$A

2007-09-01 Thread Tobie Langel
Can we have benchmarks ? On Sep 1, 7:32 pm, Robert Katić <[EMAIL PROTECTED]> wrote: > I have another question about $A and similar. > > Why you prefer do this > >var results = []; > for (var i = 0, length = iterable.length; i < length; i++) > results.push(iterable[i]); > > inste

[Prototype-core] Re: iterable/$A

2007-09-01 Thread Robert Katić
I wrote small profile http://pastie.textmate.org/93190 that I paste on firebug. This is results on my laptop: Size: 100 Times: 1 push: 4672ms init: 2922ms Size: 10 Times: 1 push: 266ms init: 594ms Size: 4 Times: 1 push: 141ms init: 79ms On Sep 2, 4:31 am, Tobie Langel <[EMAIL PRO

[Prototype-core] Re: iterable/$A

2007-09-01 Thread Robert Katić
In Opera I was able to perform similar timing with much more repetitions. Conclusion: 'init' function is double faster then 'push' function On Sep 2, 5:16 am, Robert Katić <[EMAIL PROTECTED]> wrote: > I wrote small profilehttp://pastie.textmate.org/93190that I paste on > firebug. > > This is resu