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
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 :)
Rega
+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, "maxDe
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 Eleme
On 8/30/07, Mislav Marohnić <[EMAIL PROTECTED]> wrote:
> On 8/31/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > and is there any reason not to use String.replace([regexp], function()
> > {} ) for a large part of the functions implemented by iterating
> > through arrays? this can be blazingly
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 e
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
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
Element.addMethods("tr.comba
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 subscribed
On 9/7/07, Mislav Marohnić <[EMAIL PROTECTED]> wrote:
> On 9/7/07, Nicolás Sanguinetti <[EMAIL PROTECTED]> wrote:
> >
> > Quick question: why does Element.wrap return the wrapped element
> > instead of the wrapper?
>
> Consistency. Element.Mehods methods alw
Thought: what about declaring this method using a setter? Won't affect
IE, and works fine in Mozilla, without touching Prototype's source.
something along the lines of (haven't tested, thinking on gmail):
HTMLElement.prototype.__defineSetter__("innerHTML", function(html) {
var newEl = this.clon
do $("something").__defineSetter__ etc. and then
$("something").innerHTML = "cuack" works fine :)
Damn, it was a good idea :P
On 9/14/07, Nicolás Sanguinetti <[EMAIL PROTECTED]> wrote:
> Thought: what about declaring this method using a setter? Won't affect
&g
You have to pass $super to the subclass' methods as its first argument
and then call it from there.
var Cat = Class.create(Animal, {
initialize: function($super, name) {
$super(name);
alert('Cat : initialize');
}
});
Best,
-Nicolas
On 9/20/07, Nicolás Sanguinetti &l
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#
It's not in the documentation 'cause 1.6 is still a release candidate.
When it goes final the docs will include everything in 1.6 :)
On 9/27/07, Wiktor Ihárosi <[EMAIL PROTECTED]> wrote:
>
> On Sep 27, 12:09 pm, "Richard Quadling" <[EMAIL PROTECTED]>
> wrote:
> > This returns an event, as seen vi
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
Yanick said:
> I think that this is more Java-like (which is my opinion the best OOP
> language), and it makes more sense than having an extra parameter in
> the consstructor.
Saying that in a list of ruby fans? (well, sort of) Watch your next
words carefully, Persian: they might be your last ;)
Prototype is inspired a lot by the ruby language, which names the method
'uniq'.
Best,
-Nicolas
On Nov 15, 2007 2:14 PM, Jerome <[EMAIL PROTECTED]> wrote:
>
> Hey guys,
>
> You guys have this uniq() function in the Array API
> It seems like an odd choice of a name, why not just name the function
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
argumentNames just returns the names of the arguments passed to the
function. ForEx you have
function foo(bar, baz, qux) {
alert("bar: " + bar + ", baz: " + baz + ", qux: " + qux);
}
foo.argumentNames() will return ["bar", "baz", "qux"], just as you
declared them on the function.
=
metho
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
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] f
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 Element.upd
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
r, if it's only
> related to Core JavaScript, 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]>
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",
I'd normally respond that since adding this feature is only 5 lines
away, it'd serve well as a plugin. *But*, event delegation is usually
"such a good practice" that adding this to core could be a nice
incentive for all those people that come into #prototype asking why do
my 51238 cells in the tabl
On Feb 8, 2008 9:19 PM, Nicolás Sanguinetti <[EMAIL PROTECTED]> wrote:
> I'd normally respond that since adding this feature is only 5 lines
> away,
On Feb 9, 2008 6:30 AM, kangax <[EMAIL PROTECTED]> wrote:
> The implementation is NOT as simple as it seems to be.
Teeh
On Feb 9, 2008 7:07 AM, sambo99 <[EMAIL PROTECTED]> wrote:
> On the other hand, I do think I am on to something with exploring
> implementation of a hierarchy aware Object.extend. At the bare minimum
> I think it may be worth exploring adding a function to Enumerable that
> allows you to extend it
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 wrote:
> Andrew, Richard
> Not sure if this helps, but I figured it was worth the mention... jQuery no
> longer u
30 matches
Mail list logo