easons that window cannot be extended, I would also like to know what
those are.
Thanks!
Allen
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Prototype: Core" group.
To post to this group, send email to p
I do something similar to this. However, IE's support of visibility
only works for hidden and visible, not the other two, so it is
questionable depending on browser support how you would handle showv
in your example above. In general, since IE doesn't fully support
visibility I don't use the other
You should use Strings interpolate function for this. A template is
meant to be reused many times with many different filler values.
On Jun 14, 10:41 am, Yaffle wrote:
> var Template = Class.create({
> initialize: function(template, pattern){
> var parts = template.toString().split(pattern
n how collapse and inherit are handled.
On Aug 12, 10:17 am, "joe t." wrote:
> Allen makes a good point on distinct method names, but i had my
> mutation of these written before i knew better, and mine simply wrap
> the existing methods and look for a "truthy" argum
gt; On Aug 11, 4:20 pm, Allen wrote:
>
>
>
>
>
> > When I do:
> > Event.observe(window, 'resize', alert); //Note: alert is the common
> > javascript alert function, but it will be called with no params.
>
> > Then I can do the follo
Template class instead of Template#evaluate.
> So if you will use Template#evaluate many times for one Template
> object, you will save a little time.
>
> On Aug 12, 6:41 pm, Allen wrote:
>
>
>
> > You should use Strings interpolate function for this. A template is
&g
Hi all,
I was looking into some of the array methods and noticed this
inconsistency.
>>> [1].without("1");
[]
>>> [1].intersect(["1"]);
[]
Basically, without uses an == comparison, whereas intersect uses an
=== comparison. IMHO, I think == is more appropriate. As such, I have
forked the prototyp
're problem is likely that javascript is technically CDATA, so you can't
just insert it into script tags. Also, you shouldn't post this kind of stuff
on Prototype-Core.Try
http://groups-beta.google.com/group/prototype-scriptaculous
Allen Madsen
On Fri, Aug 14, 2009 at 11:07 AM, Fray wrote:
I've looked it over and your description appears to be correct.
Allen Madsen
On Fri, Aug 21, 2009 at 11:47 AM, T.J. Crowder wrote:
>
> Hi folks,
>
> I fixed ticket #21 today with this commit (my branch, not core):
>
> http://github.com/tjc
stead of directly setting the onWhatever property. This
is the preferred way of doing things in prototype.
For future reference, this isn't the place to post questions like this.
Instead, go to http://groups-beta.google.com/group/prototype-scriptaculous
Allen Madsen
http://www.allenmadsen
+1 for what tobie said. I would prefer not to have extra $ method's that do
the same thing if possible.
Thanks,
Allen Madsen
http://www.allenmadsen.com
On Sun, Aug 30, 2009 at 5:32 AM, Tobie Langel wrote:
>
> A more elegant solution to this problem is to use a closure around th
Hi,
I think the speed improvement definitely merits going into. I would suggest
the helper be called $super so when converting, the relationship is evident.
I have to admit that passing arguments in feels odd to me though.
Allen Madsen
http://www.allenmadsen.com
On Fri, Sep 4, 2009 at 9:09 AM
not
> > defined. This works:
>
I think you need "this.nifty.$super.call(this, foo);"
Allen Madsen
http://www.allenmadsen.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Prototype: Core"
and booleans, which I don't
see as very harmful.
Allen Madsen
http://www.allenmadsen.com
On Thu, Sep 3, 2009 at 6:20 PM, kangax wrote:
>
> On Sep 3, 1:55 pm, Allen wrote:
> > Hi all,
> >
> > I was looking into some of the array methods and noticed this
> > incon
Tobie,
Do you have any input on this?
Allen Madsen
http://www.allenmadsen.com
On Mon, Sep 7, 2009 at 8:00 AM, Joran wrote:
>
> Re: Array.uniq and Array.include and '==':
>
> There's a bug in the existing Array.uniq where [false, 0].uniq()
> returns [fa
ifty()
},
crappy: function(){
this.nifty.$super(); //calls super of another function
}
});
Allen Madsen
http://www.allenmadsen.com
On Sun, Sep 6, 2009 at 5:38 AM, T.J. Crowder wrote:
>
> > > I think you need "this.nifty.$super.call(this, foo);"
> >
> > You do
type, {
toHash: function(){
var hash = $H();
this.each(function(value, i){
hash.set(i, value);
});
return hash;
}
}
IMHO, this doesn't belong in core.
Allen Madsen
http://www.allenmadsen.com
On Tue, Sep 8, 2009 at 6:03 AM, Green wrote:
>
> Often I have to
There seems to be more support for strict equality, so I'll write up a patch
with that and modify some test cases around the change.
Allen Madsen
http://www.allenmadsen.com
On Tue, Sep 8, 2009 at 7:33 AM, Tobie Langel wrote:
>
> > Tobie,
> > Do you have any input on this?
&
call
super (disregarding callee), it would be nice if defining that was
simplified. So something like:
var A = Class.create({
nifty: function(){}
});
var B = Class.create(A, function(){
function nifty(){
nifty.$super.call(this);
}
return {nifty: nifty};
});
Allen Madsen
Oh, also, you may want to throw something into update helper about your new
method of getting super.
Allen Madsen
http://www.allenmadsen.com
On Tue, Sep 8, 2009 at 9:56 AM, Allen Madsen wrote:
> Hey TJ,
> For your two suggested additions. I don't think I have ever had a use for
&g
pets relate to the source.
Allen Madsen
http://www.allenmadsen.com
On Tue, Sep 8, 2009 at 11:18 AM, T.J. Crowder wrote:
>
> @Allen,
>
> > For your two suggested additions. I don't think I have ever had a use for
> > either.
>
> Thanks.
>
> > One thing I wo
(){}
function nifty(){
privateFunction();
privateVar = 3;
}
return {nifty: nifty};
});
I'd much rather see it in this form.
Allen Madsen
http://www.allenmadsen.com
On Tue, Sep 8, 2009 at 10:12 AM, Jim Higson wrote:
>
> On Tuesday 08 September 2009 14:56:06 Allen Madsen wrote:
e questions are around selector's or the AJAX stuff. From my
experience most newbies don't even use Class.
Allen Madsen
http://www.allenmadsen.com
On Tue, Sep 8, 2009 at 2:43 PM, Robert Kieffer wrote:
>
> On Sep 8, 8:44 am, "T.J. Crowder" wrote:
>>
reasonable to allow each individual developer to handle
it as they see fit.
Allen Madsen
http://www.allenmadsen.com
On Wed, Sep 9, 2009 at 7:29 AM, T.J. Crowder wrote:
>
> Hi all,
>
> I thought of a wrinkle today: Mixins. This new mechanism modifies
> function instances if
I'm with kangax on this one. I have never needed this functionality.
Allen Madsen
http://www.allenmadsen.com
On Fri, Sep 11, 2009 at 11:59 AM, James Aimonetti
wrote:
>
> My interest was piqued when reading
> http://www.timdown.co.uk/jshashtable/index.html if that helps furthe
Arty,
I believe that use case is used by element storage now. Instead of a
hash of DOM element to data, you can simply use an array of DOM
elements and they will have their storage attached. The speed would
probably be faster than a true hash.
Allen Madsen
http://www.allenmadsen.com
On Sat
kangax, there are no collisions if everything is prefixed like Yaffle suggests.
Allen Madsen
http://www.allenmadsen.com
On Tue, Sep 22, 2009 at 8:03 AM, kangax wrote:
>
> On Sep 21, 4:40 pm, Yaffle wrote:
>> base2.js uses prefix for it's "Map" Class
>
>
I think Function.identity is fine. If somebody is unsure of what it it
they can check the docs.
Allen Madsen
http://www.allenmadsen.com
On Fri, Sep 25, 2009 at 6:22 AM, T.J. Crowder wrote:
>
>> Hmm, whilst technically correct, the term "identity" may not be what
&g
Agreed +1
Allen Madsen
http://www.allenmadsen.com
On Fri, Oct 2, 2009 at 2:42 PM, Simon Charette wrote:
> Element#destroy would definitely be useful. +1
>
> I really think this is a better idea then making a public interface to
> reach destroyCache since it resolves into one funct
I'd prefer isEmpty as well.
Allen Madsen
http://www.allenmadsen.com
On Fri, Oct 2, 2009 at 3:34 PM, joneff wrote:
>
> I've been pondering on this one for quite a long time -- why is it
> String#empty instead of String#isEmpty? To me String.empty should be a
> field e
Jim,
Check this modification of Tobie's code out.
http://gist.github.com/203978
The problem you're describing is fixed by using a unique element to
fire the events from.
Allen Madsen
http://www.allenmadsen.com
On Wed, Oct 7, 2009 at 5:59 AM, Tobie Langel wrote:
>
> Hi ag
Joran,
The type of number extensions you described aren't part of prototype.
Therefore, it is simpler for developers who aren't using such an
extension to use seconds. I'm not opposed to the switch, but I wanted
to throw out a possible explanation for the way it is today.
Al
I have to agree with T.J. In addition to complexity, there is also a
concern for size. If I am using the newest version of the code, why
would I want the added weight of compatibility stuff I will never use?
Allen Madsen
http://www.allenmadsen.com
On Sun, Oct 11, 2009 at 3:25 AM, T.J. Crowder
solutions you mention though, I would prefer the first.
Allen Madsen
http://www.allenmadsen.com
On Thu, Oct 22, 2009 at 1:50 PM, Ngan Pham wrote:
> It would be nice if Event#observe's eventName argument was able to take an
> array, or perhaps a comma delimited string so that it ca
You could try unittest_js'[1] benchmark function. It's at the very end
of the file. It'll help with the timing. Other than that, you may like
the page speed extension for firebug.
[1] http://github.com/tobie/unittest_js/blob/master/assets/unittest.js
Allen Madsen
http://www.allenm
project.
Allen Madsen
http://www.allenmadsen.com
On Thu, Nov 26, 2009 at 8:16 AM, Sebastien wrote:
> Hi everybody.
>
> First of all, I want to congratulate your great work on this
> framework.
> I'm writing this to propose you a great improvement for the
> framework : the serve
Try setting the page encoding. For example, for html use:
or for xhtml use:
Though, I'm not sure this will fix your problem. It's just a guess.
Allen Madsen
http://www.allenmadsen.com
On Wed, Dec 2, 2009 at 5:33 PM, John wrote:
> If I sent a parameter with "bogotá&quo
Does it break if you use "htmlentities($searchParameter,ENT_COMPAT,'UTF-8');"
for all browsers?
Allen Madsen
http://www.allenmadsen.com
On Fri, Dec 11, 2009 at 2:42 PM, John wrote:
>
> the page has this meta-tag
>
> but I get the same bug :(
>
>
I tried running your test on IE8 and it just kept prompting me with script
unresponsive.
Allen Madsen
http://www.allenmadsen.com
On Wed, Dec 16, 2009 at 7:01 AM, Robert Kieffer wrote:
> I whipped up a quick JSLitmus test to try out a handful of empty loops
> (using i++, ++i, i+=1, and a
Yea, addMethods is what you want. You can't just add them directly to the
klass object.
Allen Madsen
http://www.allenmadsen.com
On Wed, Dec 23, 2009 at 4:27 AM, T.J. Crowder wrote:
> Hi,
>
> > I ran into problems when I tried
> > to change a class that another class was
+1 for static methods. Not sure about the implications of the rest yet.
Allen Madsen
http://www.allenmadsen.com
On Tue, Dec 29, 2009 at 7:13 AM, Joran Greef wrote:
> Propose:
>
> Http.get(uri, options) and Http.post(uri, options).
>
> Where:
>
> options = {
> he
I wouldn't mind if this made it into core either.
Allen Madsen
http://www.allenmadsen.com
On Tue, Jan 12, 2010 at 3:21 PM, matti wrote:
> Is there a reason why Prototypejs doesn't fire mutation events
> (
> http://www.w3.org/TR/DOM-Level-2-Events/events.html#Ev
that case DOM modification events
are useful. However, I wasn't aware of all the complications Andrew
brought up. I'll play around with this and see what I come up with.
Allen Madsen
http://www.allenmadsen.com
On Wed, Jan 20, 2010 at 5:01 PM, Diego Perini wrote:
> Andrew,
>
.click();
});
$(document.body).hotkey('ctrl+shift+s', function(event){
alert('you found the secret key combination');
});
Allen Madsen
http://www.allenmadsen.com
On Thu, Mar 4, 2010 at 4:56 PM, Capripot wrote:
> Where is the attribute "keyCode" of Event in t
I agree that a road map would be helpful. In addition to the reasons
gf3 mentioned, I think it would make it easier to contribute.
Allen Madsen
http://www.allenmadsen.com
On Wed, Apr 7, 2010 at 4:53 PM, gf3 wrote:
> This is a continuation of the discussion started here:
> http://gith
I have used something like this in a project as well. I wouldn't mind
seeing it in core. I don't particularly care what its called.
Allen Madsen
http://www.allenmadsen.com
On Fri, Apr 23, 2010 at 9:00 AM, Titi Alailima wrote:
> On Fri, Apr 23, 2010 at 6:28 AM, Mislav Maro
I agree with T.J.
Allen Madsen
http://www.allenmadsen.com
On Sat, May 8, 2010 at 2:07 AM, T.J. Crowder wrote:
> Hi,
>
> Validating HTML against a DOCTYPE is a non-trivial task, and it should
> be (IMHO) an authoring-time task (using tools like the W3C
> Validator[1]) rather
Hi Richard,
I may be misunderstanding what you are asking, but the documentation
doesn't mention a second parameter. Rather, it says the headerJSON is
a property on the first parameter passed into your onSuccess/onFailure
methods.
Hope that helps!
Allen Madsen
http://www.allenmadsen.com
Element#replace may be what you are looking for.
Allen Madsen
http://www.allenmadsen.com
On Sat, Jul 3, 2010 at 6:00 AM, Viktor Kojouharov wrote:
> I understand that. And I was using update to clear the container and
> add a new element. My problem was, I have a reference to the pr
49 matches
Mail list logo