[Prototype-core] 1.6.0 inheritance
I just wanted to shoot the core team a quick note letting everyone know that I am really excited by the way the new inheritance features are shaping up in trunk. It looks really great. I am glad someone (Samuel Lebeau) managed to get in a patch that uses {{{Function#wrap}}} instead of my old {{{Class#inherit}}} method. It's much cleaner and concisely written in trunk right now. As soon as I saw Thomas Fuchs present the new {{{Function#wrap}}} at RailsConf '07 this year I wanted to make that change. I just never got around to and eventually forgot about it, so I am especially happy to see it there. Alex Arnell --~--~-~--~~~---~--~~ 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: DOM API suggestion
FYI: Insertion.Bottom is deprecated in 1.6. On Aug 21, 10:20 pm, Tom Gregory <[EMAIL PROTECTED]> wrote: > Nothing. =) If you leave off the second parameter of Element.input, > it acts much like Insertion.bottom, which was what I first suggested. > Different way of getting to the same thing. > > His other question was looking for an Element -> String conversion, > much (I suspect) like outerHtml. > > TAG > > On Aug 21, 2007, at 7:54 PM, kangax wrote: > > > > > Tom, Thymus: > > > What's wrong with new Element#insert? > > > document.body.insert('hello > > world > a>'); > > > works for me as expected: > > ... > > > > > > hello world > > > > ... > > > > ... --~--~-~--~~~---~--~~ 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: DOM API suggestion
Nothing. =) If you leave off the second parameter of Element.input, it acts much like Insertion.bottom, which was what I first suggested. Different way of getting to the same thing. His other question was looking for an Element -> String conversion, much (I suspect) like outerHtml. TAG On Aug 21, 2007, at 7:54 PM, kangax wrote: > > Tom, Thymus: > > What's wrong with new Element#insert? > > document.body.insert('hello > world a>'); > > works for me as expected: > ... > > > hello world > > ... > > ... > > > > --~--~-~--~~~---~--~~ 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: DOM API suggestion
Tom, Thymus: What's wrong with new Element#insert? document.body.insert('hello world'); works for me as expected: ... hello world ... ... --~--~-~--~~~---~--~~ 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] Element#appendText
I love the DOM builder. (aka new Element) I noticed a performance issue using the Element#update method. For example: new Element('p').update('Some Text') ; - is slower then - new Element('p').appendChild( document.createTextNode('Some Text') ); Should Tobie Langel's Element#appendText method be added to the core? http://tobielangel.com/2007/5/22/prototype-quick-tip thanks, ~jake --~--~-~--~~~---~--~~ 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] Bug?
4014: "src='://javascript:void(0)'><\/script>"); shouldn't this be: 4014: "src='http://javascript:void(0)'><\/script>"); ie6 was tossing errors on-load, but only when mod-rewrite was turned on and my server was dumping a full web page back to this request, which shouldn't even hit the server, right? :) --~--~-~--~~~---~--~~ 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: DOM API suggestion
Christophe, Thanks for the correction. Welcome back. I too don't see the use, hence the brusque reply. Thymus, In IE one could use outerHTML, in other browsers as a workaround. some combination of temporary elements, replace(), and innerHTML works too: var tempEl = new Element('div'); tempEl.appendChild($(someEl).replace(tempEl)); var str = tempEl.innerHTML; tempEl.replace($(somEl)); return str; TAG On Aug 21, 2007, at 4:53 PM, Christophe Porteneuve wrote: > > Hey Tom, > > Tom Gregory a écrit : >> Done. ... quite a while ago, actually. >> >> alert($('input').inspect()); >> See http://prototypejs.org/api/element/inspect > > Not quite so, actually: inspect() will only add id= and class=, not > introspect the attributes. Also, how to behave for non-empty > elements? > > At any rate, I fail to see the usefulness of such a function, at least > at the Core level, outside of debugging needs. And for debugging, we > have tooling already... > > -- > Christophe Porteneuve a.k.a. TDD > "[They] did not know it was impossible, so they did it." --Mark Twain > Email: [EMAIL PROTECTED] > > > --~--~-~--~~~---~--~~ 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: DOM API suggestion
Hey Tom, Tom Gregory a écrit : > Done. ... quite a while ago, actually. > > alert($('input').inspect()); > See http://prototypejs.org/api/element/inspect Not quite so, actually: inspect() will only add id= and class=, not introspect the attributes. Also, how to behave for non-empty elements? At any rate, I fail to see the usefulness of such a function, at least at the Core level, outside of debugging needs. And for debugging, we have tooling already... -- Christophe Porteneuve a.k.a. TDD "[They] did not know it was impossible, so they did it." --Mark Twain Email: [EMAIL PROTECTED] --~--~-~--~~~---~--~~ 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: DOM API suggestion
Done. ... quite a while ago, actually. On Aug 21, 2007, at 3:46 PM, Thymus wrote: > A method to get a string from an element and reverse. > I explain : > > > alert($('input').toHTMLString()); > should display the string : '' alert($('input').inspect()); See http://prototypejs.org/api/element/inspect > var str = ''; > var elem = str.toHTMLElement(); > > $('mydiv').appendChild(elem); new Insertion.Bottom('mydiv', str); See http://prototypejs.org/api/insertion/bottom TAG --~--~-~--~~~---~--~~ 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] DOM API suggestion
Hello everyone, If I may suggest you a new feature, it would be this one : A method to get a string from an element and reverse. I explain : alert($('input').toHTMLString()); should display the string : '' and var str = ''; var elem = str.toHTMLElement(); $('mydiv').appendChild(elem); should append the input into the div mydiv Would it be possible ? Thanks, Cheers, Thymus --~--~-~--~~~---~--~~ 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: Possible bug.
Confirmed. I rewrote as unit tests (the alerts didn't show what was actually failing): http://pastebin.com/m6bc554f9 ==Safari 3.0.3 (OS X): failed testEachWriteAttribute 1 assertions, 1 failures, 0 errors Failure: assertEnumEqual: expected [true], actual [false] It's quite odd to me that invoking writeAttribute worked, but each writeAttribute did not. ==Firefox 2.0.0.6 (OS X): failed testInvokeWriteAttribute 1 assertions, 1 failures, 0 errors Failure: assertEnumEqual: expected [true], actual [false] failed testEachWriteAttribute 1 assertions, 1 failures, 0 errors Failure: assertEnumEqual: expected [true], actual [false] The same is still true as of current HEAD, rev 7353. TAG On Aug 21, 2007, at 9:56 AM, Richard Quadling wrote: > > http://pastebin.com/d748a99f8 > > Specifically, trying to use writeAttribute() fails. > > This is using 1.6.0_rc0 (August 15, 2007). > > Richard. > > -- > - > Richard Quadling > Zend Certified Engineer : http://zend.com/zce.php? > c=ZEND002498&r=213474731 > "Standing on the shoulders of some very clever giants!" > > > --~--~-~--~~~---~--~~ 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] Patch review request: #8184 maxFrequency for Ajax.PeriodicalUpdater's decay functionality
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 -~--~~~~--~~--~--~---
[Prototype-core] Possible bug.
http://pastebin.com/d748a99f8 Specifically, trying to use writeAttribute() fails. This is using 1.6.0_rc0 (August 15, 2007). Richard. -- - Richard Quadling Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731 "Standing on the shoulders of some very clever giants!" --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---