Re: [Prototype-core] Playing with Google's Closure Compiler and got a message for Prototype 1.7.0.0

2011-05-17 Thread Nicolás Sanguinetti
I like that it warns about *lack* of side effects. I mean, any functional programmer would think that's a great warning to have :) -foca On Tue, May 17, 2011 at 3:24 PM, Rick Waldron waldron.r...@gmail.com wrote: Andrew, Richard Not sure if this helps, but I figured it was worth the mention...

[Prototype-core] Re: Element.update on images. Bug or Feature Request?

2008-01-24 Thread Nicolás Sanguinetti
The thing is that someone who knows Prototype knows that update changes the innerHTML of an element. If another programmer sees your code and sees you're updating an image, he'll be a little puzzled :) If you use image.src = path, or image.setAttribute(src, path) or image.writeAttribute(src,

[Prototype-core] Re: Javascript closures question

2008-01-08 Thread Nicolás Sanguinetti
On Jan 8, 2008 11:20 PM, Simon Thomas [EMAIL PROTECTED] wrote: Can anyone explain the difference in the folllowing and when and why to use each of the methods. (Or knows a better place to ask this question) 1) var myVar = function(args){ // inner functions and vars }; This makes

[Prototype-core] Re: Javascript closures question

2008-01-08 Thread Nicolás Sanguinetti
, on any other JavaScript mailing list. Thanks! On Jan 9, 2008 2:36 AM, Nicolás Sanguinetti [EMAIL PROTECTED] wrote: On Jan 8, 2008 11:20 PM, Simon Thomas [EMAIL PROTECTED] wrote: Can anyone explain the difference in the folllowing and when and why to use each of the methods

[Prototype-core] Re: element.update( document.createTextNode( hello ) ); [object Text]

2008-01-07 Thread Nicolás Sanguinetti
element.update(hello) Element.update can take a string (in which case it's set as innerHTML), an Element object, or any object that responds to either toElement or toHTML (and which returns accordingly either an element or a string of html :)) (The same goes for Element.replace and

[Prototype-core] Re: Is there an I18N support in prototype

2007-12-30 Thread Nicolás Sanguinetti
If you need just sprintf functionality, there's a nice wrapper around the Template class in String.interpolate http://www.prototypejs.org/api/string/interpolate Best, -Nicolas On Dec 30, 2007 1:08 PM, Severin Heiniger [EMAIL PROTECTED] wrote: There's already the powerful Template [1]

[Prototype-core] Very weird behavior with event tests

2007-12-17 Thread Nicolás Sanguinetti
I was trying to figure out the problem of a poster in the spinoffs list (http://groups.google.com/group/rubyonrails-spinoffs/browse_thread/thread/4ff06bf903aced80) about Event.observe throwing errors with the element. I saw the code, it was using Event.observe(unextended_node, ...), so I figured

[Prototype-core] Re: features request

2007-11-21 Thread Nicolás Sanguinetti
For the Cookies you have Prototype.Tidbits on livepipe: http://livepipe.net/projects/prototype_tidbits/ And I know someone had done Moo's Assets for Prototype, but can't find the link. Best, -Nicolas On Nov 21, 2007 8:35 AM, Mislav Marohnić [EMAIL PROTECTED] wrote: These are useful, but I don't

[Prototype-core] Re: Superclass constructor

2007-09-28 Thread Nicolás Sanguinetti
I'm not gonna say to you that if you have something complex calling destructors isn't correct. I'm just gonna argue against it being in core, as IMHO it's something that not really many people need, and, since you have to call it manually, the best you can do is defining a naming convention, not

[Prototype-core] Re: Superclass constructor

2007-09-22 Thread Nicolás Sanguinetti
On 9/22/07, Les [EMAIL PROTECTED] wrote: The OpenLayers API 2.5 (a maping API in part based on Prototype) supports multiple inheritance, so why not Prototype? Mislav said: Also, multiple inheritance isn't all that good. There is a reason Java and C++ successors like Objective-C and C# chose

[Prototype-core] Element.wrap

2007-09-07 Thread Nicolás Sanguinetti
Quick question: why does Element.wrap return the wrapped element instead of the wrapper? I've yet to find somewhere where I use wrap that I don't do .wrap(...).up() Is it just me? -Nicolas --~--~-~--~~~---~--~~ You received this message because you are

[Prototype-core] Element.addMethods

2007-09-04 Thread Nicolás Sanguinetti
How does the core team feel about letting Element.addMethods accept, other than a tagname, a specific node or an array of nodes and extend only those? For example, I want only certain rows of a table to have some methods available, and would love to do something like

[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 mind maps

[Prototype-core] Re: simulated DOMContentReady event

2007-08-30 Thread Nicolás Sanguinetti
Dan Webb's LowPro[1] solves this kind of issue by registering a global Ajax.Responder that evaluates DOMContentReady behaviors onComplete. Thinking along similar lines, you could wrap Event.observe so that observers set for contentloaded are also stored into a queue that gets processed after

[Prototype-core] Re: $('my-element').$$('a[href=foo]');

2007-08-29 Thread Nicolás Sanguinetti
On 1.6.0 this has been aliased to select $(my-element).select(a[href=foo]) -Nicolas On 8/29/07, Jacob Rockowitz [EMAIL PROTECTED] wrote: Hi, I have been using Element#getElementsBySelector a lot and keep feeling that the method's name is too verbose, couldn't it just be an Element#$ $.

[Prototype-core] Re: Patch review request: #8184 maxFrequency for Ajax.PeriodicalUpdater's decay functionality

2007-08-28 Thread Nicolás Sanguinetti
+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),

[Prototype-core] Suggestion: Form#focusFirstElement accepting an optional selector

2007-08-26 Thread Nicolás Sanguinetti
I've been using http://pastie.caboo.se/91025 so when a user has errors in the form, the focused element is the first erroneous field (and when there are no errors, it behaves normally, focusing the first element). If the core team thinks it's useful I'll write a patch with proper tests :)

[Prototype-core] Re: Date prototype functions [BUMP]

2007-08-23 Thread Nicolás Sanguinetti
As soon as I get some free time from work, I'll rewrite a lot of active support for js (http://code.google.com/p/active-support-for-javascript), including all necessary adjustments to work well with 1.6 (like removing the interpolation methods, which are now useless :)) Best regards, -Nicolas On