[Prototype-core] keypress remapped as keydown in prototype 1.6rc0

2007-09-25 Thread Viktor Kojouharov
Why has the keypress been remapped as keydown in the rc? AFAIK, keypress is the only key event that fires as the button is held pressed. With this remap, it's impossible to create continuous actions. Is there any particular reason why this remap has been introduced?

[Prototype-core] Re: keypress remapped as keydown in prototype 1.6rc0

2007-09-25 Thread Mislav Marohnić
On 9/25/07, Viktor Kojouharov [EMAIL PROTECTED] wrote: Is there any particular reason why this remap has been introduced? Yes. In certain browsers (WebKit, for one), the keycode property isn't available on that event, so it's remapped to achieve cross-browser compatibility. I, for one, never

[Prototype-core] Re: Thoughts about 1.6

2007-09-25 Thread Ryan Gahl
I vote an emphatic No - this would be overhead within proto-core, which should remain as _baseline_ as possible (that's my rant and I'm sticking to it - proto is a baseline - don't bloat it... please!). What people need to get in the habit of doing is loading an extensions.js file (or something)

[Prototype-core] Re: Thoughts about 1.6

2007-09-25 Thread Mislav Marohnić
On 9/25/07, Ryan Gahl [EMAIL PROTECTED] wrote: var oldInsert = Element.insert; Element.insert = function(...) {... fireYourCustomEvent() ... oldInsert(...)}; We hear what you are saying. I don't know all the things Sam had in mind, but I'm pretty sure he wasn't going to slow down Prototype

[Prototype-core] Re: Thoughts about 1.6

2007-09-25 Thread [EMAIL PROTECTED]
I vote an emphatic No - this would be overhead within proto-core, which should remain as _baseline_ as possible (that's my rant and I'm sticking to it - proto is a baseline - don't bloat it... please!). I see that point - and that was the type of discussion that I wanted to spawn. I agree

[Prototype-core] Re: keypress remapped as keydown in prototype 1.6rc0

2007-09-25 Thread Andrew Red
Will it be addressed, then? On Sep 25, 5:05 pm, Mislav Marohnić [EMAIL PROTECTED] wrote: On 9/25/07, Viktor Kojouharov [EMAIL PROTECTED] wrote: Is there any particular reason why this remap has been introduced? Yes. In certain browsers (WebKit, for one), the keycode property isn't

[Prototype-core] String#times performance pit in IE

2007-09-25 Thread Andrew Red
As can be noted by increasing the argument in String#times, execution time slows down dramatically and makes logarithmically identical curve (to one produced my String#times in FireFox), yet of doubled order magnitude. An alternative method for IE exists that makes use of array concatenation.

[Prototype-core] Re: String#times performance pit in IE

2007-09-25 Thread Mislav Marohnić
On 9/25/07, Andrew Red [EMAIL PROTECTED] wrote: An alternative method for IE exists that makes use of array concatenation. Below are the tests, benchmarks and conclusions: ... Interesting. All this JavaScript gurus say don't use String concatenation; use array.join instead ... and it's

[Prototype-core] JSON conversion isn't adequate

2007-09-25 Thread Andrew Red
To explain the subject line, I believe, the concept of JSON strings should be described by the following formula: eval(obj.toJSON()) - obj, i.e. toJSON methods should return such a string from an object that if evaluated, the result to be identical to that original object. I believe, this

[Prototype-core] Re: JSON conversion isn't adequate

2007-09-25 Thread Ken Snyder
Andrew Red wrote: ... 1. Date#toJSON returns a string, if evaluated, it won't become that same date again: I'd like to note that this unit test passes in IE and FF: testDate: function() {with(this) { var date = new Date(); assert((eval('new Date(' + (date

[Prototype-core] Re: JSON conversion isn't adequate

2007-09-25 Thread Tobie Langel
Hi, Regarding your first and 3rd point, Prototype's JSON implementation is based on RFC 4627 (http://www.ietf.org/rfc/rfc4627.txt?number=4627) and maps Douglas Crockford's JS implementation (http://json.org/ json.js). JSON is a language agnostic data exchange format which happens to be easily

[Prototype-core] Re: Thoughts about 1.6

2007-09-25 Thread [EMAIL PROTECTED]
var oldInsert = Element.insert; Element.insert = function(...) {... fireYourCustomEvent() ... oldInsert(...)}; Just for reference, the way that I got this to work in Prototype 1.6 was (hopefully this accounts for all cases): var prev = {};

[Prototype-core] Re: JSON conversion isn't adequate

2007-09-25 Thread Tobie Langel
Also consider that JSON is not eval'ed unless the regex detects that there are no illegal tokens such as function calls that would open up a script to hacking That's only true if you've passed true to String#evalJSON's sanitize argument - see http://prototypejs.org/api/string/evalJSON for

[Prototype-core] Re: Thoughts about 1.6

2007-09-25 Thread [EMAIL PROTECTED]
No one probably cares but me about this - but there were a few issues with the previous code...here is some that works, and is suitable for placing in an extension.js file: var prev = {}; [insert,remove,replace,update,wrap].each(function(s){prev[s] = Element[s]}); var add = { insert:

[Prototype-core] Re: JSON conversion isn't adequate

2007-09-25 Thread Tom Gregory
On Sep 25, 2007, at 4:20 PM, Andrew Red wrote: To explain the subject line, I believe, the concept of JSON strings should be described by the following formula: eval(obj.toJSON()) - obj, i.e. toJSON methods should return such a string from an object that if evaluated, the result to be

[Prototype-core] Re: JSON conversion isn't adequate

2007-09-25 Thread Andrew Red
Yeah, yeah, thanks to all. I should have read the RFC thing before even thinking to write about it. (json.org is well-known, thanks) Idea not good. Unless, of course, if someone sees otherwise. Still, I think it was worth bringing your attention to it. Best regards, Andrew Revinsky On

[Prototype-core] Submitted a Patch, Mark as Fixed?

2007-09-25 Thread Woil
http://dev.rubyonrails.org/ticket/7412 I'm fairly confident that I've fixed this problem, so I marked the patch as fixed. Should I have done this? Do they need to stay as not- fixed until the patch is included? --~--~-~--~~~---~--~~ You received this message