[Prototype-core] Re: Class.from(base) - for real class inheritance ?
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 class (static) properties, but in a more advanced way that you've shown here. The ticket is http://dev.rubyonrails.org/ticket/9329. It doesn't apply cleanly anymore so I have to update it. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[Prototype-core] Re: simulated DOMContentReady event
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, or just use text/javascript returns (note that this would well be something that we consider for inclusion in the library!). I think making contentloaded too magic breaks POLS. best, ghomas Am 31.08.2007 um 17:25 schrieb Jeff Watkins: On Aug 31, 2007, at 12:34 AM, Andrew Dupont wrote: Jeff, my suggestion is to write your own Event.onReady function (or something like it) that wraps around the 1.6 event code. Yeah, that's kind of what I figured. But since it's got to be a pretty common situation, I thought it might deserve a solution in the library. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[Prototype-core] Re: Class.from(base) - for real class inheritance ?
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 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 class (static) properties, but in a more advanced way that you've shown here. The ticket ishttp://dev.rubyonrails.org/ticket/9329. It doesn't apply cleanly anymore so I have to update it. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[Prototype-core] Re: iterable/$A
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 length; i++) results[i] = iterable[i]; It's more faster! --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[Prototype-core] Re: simulated DOMContentReady event
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 mind maps the I've just loaded this fragment via ajax to I've just finished loading this dom, but that's me, and I understand this is subjective. Anyway, the custom event solution seems tidy enough. What do the w3c specs say on xmlhttprequests and contentloaded, if anything? -Nicolas --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[Prototype-core] Re: simulated DOMContentReady event
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. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[Prototype-core] Re: iterable/$A
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]); instead of var length = iterable.length, results = new Array(length); for (var i = 0; i length; i++) results[i] = iterable[i]; It's more faster! --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[Prototype-core] Re: iterable/$A
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 PROTECTED] wrote: 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]); instead of var length = iterable.length, results = new Array(length); for (var i = 0; i length; i++) results[i] = iterable[i]; It's more faster! --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---