[Prototype-core] Re: Unified browser detection patch

2007-01-19 Thread Andrew Dupont
I took a cue from Sam's Prototype.BrowserFeatures object. I am not against adding to the namespaces, but I want to make sure it's done judiciously and carefully. Note that typng Prototype.Browser.KHTML is still easier than typing navigator.userAgent.test(/KHTML/). And while I don't think that

[Prototype-core] Proposed rewrite of $$/Selector

2007-01-19 Thread Andrew Dupont
I posted about this on Basecamp, but now that we've started to use this list I'm going to post it here for public consumption. We've talked about optimizing $$ in the past -- it's one of my personal goals for 1.5.1. So I took great interest in Jack Slocum's new DomQuery extension for YUI

[Prototype-core] Re: Ajax Request Fails in Prototype Release 1.5 When also loading json.js

2007-02-07 Thread Andrew Dupont
#7475 (http://dev.rubyonrails.org/ticket/7475) will fix this once it's applied. I admire the hell out of Doug Crockford, but sometimes I want to shove a JSON string down his throat. Cheers, Andrew On Feb 7, 10:21 pm, Ken Snyder [EMAIL PROTECTED] wrote: NL wrote: When loading both Prototype

[Prototype-core] Re: Another magical IE bug, breaks Element.extend

2007-02-08 Thread Andrew Dupont
If setting the expando to a function, rather than a boolean, prevents it from persisting when it should not, then that's fantastic. It'd also solve the similar problem where cloned nodes say they're extended but are not. Write a patch! Andrew On Feb 8, 12:05 pm, Mislav Marohnić [EMAIL

[Prototype-core] Re: Hash constructor

2007-02-10 Thread Andrew Dupont
On Feb 8, 7:59 pm, Alexander Presber [EMAIL PROTECTED] wrote: With prototype-based inheritance they all point to the same copy. It's a big win for memory usage. Read this interview with Dean Edwards:http://snook.ca/archives/writing/an_interview_wi/ I see your point. But this is not

[Prototype-core] Re: Proposed rewrite of $$/Selector

2007-02-13 Thread Andrew Dupont
Thanks for the compliments, guys. Alex Russell's post on the subject (http://blog.dojotoolkit.org/ 2007/02/04/dojoquery-a-css-query-engine-for-dojo) has stirred some diplomatic talks. It looks like Alex, John Resig, Jack Slocum, Dean Edwards, and I are going to pitch in toward some sort of site

[Prototype-core] Re: Proposed rewrite of $$/Selector

2007-02-16 Thread Andrew Dupont
On Feb 15, 4:14 pm, Thomas Fuchs [EMAIL PROTECTED] wrote: Andrew, this is just incredible. Keep it going. :) Thanks! I've finally submitted this as patch #7568 (http://dev.rubyonrails.org/ ticket/7568) and have updated the test page at (http:// andrewdupont.net/test/double-dollar/). There are

[Prototype-core] Re: Proposed rewrite of $$/Selector

2007-02-16 Thread Andrew Dupont
Oh, one more thing I forgot to mention... I'd still like to make optimizations for three common kinds of selectors: * A single tag name (li) * A single class name (.external) * Any selector with an ID in it (div #sidebar) The first two are important, in my opinion, because they'll get used a

[Prototype-core] Re: Proposed rewrite of $$/Selector

2007-02-16 Thread Andrew Dupont
On Feb 16, 8:43 am, Christophe Porteneuve [EMAIL PROTECTED] wrote: This is great, but you would need to provide unit tests for the extra features... Yeah, working on that. I posted the patch in the airport in Tel Aviv right before boarding a plane, and unit tests slipped my mind at the time.

[Prototype-core] Re: Proposed rewrite of $$/Selector

2007-02-16 Thread Andrew Dupont
On Feb 16, 11:57 am, Ken Snyder [EMAIL PROTECTED] wrote: Andrew Dupont wrote: Do you have a list of pseudo-elements you want to support? The list you posted is more or less my list, in terms of priority. Do we want to address pseudo-elements that normally refer to text nodes or fragments

[Prototype-core] Re: From rubyonrails-spinoffs: is Element.setStyle a resource hog?

2007-02-18 Thread Andrew Dupont
On Feb 18, 12:22 pm, Marius Feraru [EMAIL PROTECTED] wrote: So, the only issue still standing in this paragraph is how to detect different versions. People [1] think the right choice is not browser detection, but object detection. This is a very weary subject, I don't really want to reiterate

[Prototype-core] Re: From rubyonrails-spinoffs: is Element.setStyle a resource hog?

2007-02-18 Thread Andrew Dupont
On Feb 18, 3:05 pm, Martin Ellis [EMAIL PROTECTED] wrote: Why cant prototype have elegant code and optimised code. I'm not talking about milliseconds of optimisation, even i am not that machocistic. But when a function gets so much use like setStyle, should asthetically pleasing code give

[Prototype-core] Re: From rubyonrails-spinoffs: is Element.setStyle a resource hog?

2007-02-18 Thread Andrew Dupont
On Feb 18, 3:29 pm, Mislav Marohnić [EMAIL PROTECTED] wrote: Unfortunately, this is where JavaScript 2 is going right now. And it's already too late to change anything. It's really not as bleak as all that. Most of what JS2 borrows from Java is syntax. And if you don't care for type

[Prototype-core] Re: From rubyonrails-spinoffs: is Element.setStyle a resource hog?

2007-02-18 Thread Andrew Dupont
On Feb 18, 6:50 pm, Martin Ellis [EMAIL PROTECTED] wrote: Anyway we're straying massivly from the topic. The point goes back to the setStyle being a resource hog. How can this be improved as with the heavy dependance of it in script.aculo.us it is in desperate need of reworking. I just

[Prototype-core] Re: Proposed rewrite of $$/Selector

2007-02-18 Thread Andrew Dupont
On Feb 18, 9:45 pm, Ken Snyder [EMAIL PROTECTED] wrote: Yes, it was very slow for me too with any of the nth- predicates. That nth routine relies on counting the number of previous siblings FOR EVERY NODE. I'm not sure if that is avoidable, but I've added the corresponding xpath... see

[Prototype-core] Re: Proposed rewrite of $$/Selector

2007-02-18 Thread Andrew Dupont
Gentlemen, based on your progress I've managed to implement some more stuff. I've updated patch #7568. Supported are nearly all of the argumentless pseudoclasses, which I consolidated into one regex. (Also implemented the general sibling combinator: div ~ p.) I haven't done exhaustive testing

[Prototype-core] New branch for $$/Selector rewrite

2007-02-20 Thread Andrew Dupont
If you bleeding-edgers do an SVN update you'll notice that there's a new selectors branch. The version of selector.js contained therein is another major advancement from the previous version (attached to patch #7658). Christophe's excellent code reviews and revisions have been indispensible;

[Prototype-core] Re: Ajax.Request Breaks on Firefox

2007-02-23 Thread Andrew Dupont
On Feb 23, 4:37 pm, Colin Mollenhour [EMAIL PROTECTED] wrote: Man this is getting annoying.. I wish json.org would change their code or Prototype would use $H().each in setRequestHeaders or both (preferable) would happen soon. This is popping up on Rails Spinoffs at least twice a day it

[Prototype-core] Re: Ajax.Request Breaks on Firefox

2007-02-23 Thread Andrew Dupont
You're still treating Request.responseText as if it were JSON, even though you're no longer converting it to JSON. The solution is not to remove the JSON conversion -- it's to find a JSON library that doesn't muck with Object.prototype. (I seem to recall there's an older version of Crockford's

[Prototype-core] Re: Hash.toQueryString changes

2007-03-02 Thread Andrew Dupont
#4 looks fine to me. On #1 and #2: perhaps the answer is... { foo: undefined } = foo= { foo: null } = I don't know if this is useful or not, but it would allow you to distinguish between these two cases, since null and undefined are distinct values with different meanings. I have no opinion

[Prototype-core] Re: New Branch: Ajax

2007-03-08 Thread Andrew Dupont
On Mar 8, 3:43 pm, Rick Olson [EMAIL PROTECTED] wrote: How are you planning to do date serialization for json? I did some work in Rails and noticed it used Thu Mar 08 15:41:36 CST 2007, which is no good. I wrote a json plugin for rails that uses the fjson gem to parse incoming json, and

[Prototype-core] Re: Hash.toQueryString changes

2007-03-15 Thread Andrew Dupont
You act as if the web isn't built upon conventions, even arbitrary ones. I think this is a POLS issue, only we disagree on which behavior is least surprising. But since Prototype is designed to go hand-in-hand with Rails, and since JavaScript methods can be redefined at runtime, I think the

[Prototype-core] Re: Hash.toQueryString changes

2007-03-15 Thread Andrew Dupont
want this to be decided only by the handful of people who've posted in this thread. Cheers, Andrew On Mar 15, 6:30 pm, Marius Feraru [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Andrew Dupont wrote: You act as if the web isn't built upon conventions, even arbitrary

[Prototype-core] Re: $$() and :nth psuedo-elements

2007-03-17 Thread Andrew Dupont
This is what I came up with for the XPath version: http://pastie.caboo.se/47671 It's a direct port of the logic of parseNth (albeit not yet tested). I'll look at yours and see if it makes more sense, though. Cheers, Andrew On Mar 17, 4:51 pm, Trevan Richins [EMAIL PROTECTED] wrote: Andrew

[Prototype-core] Re: CSS syntax for node creation?

2007-03-20 Thread Andrew Dupont
That's an interesting idea. Parts of CSS3 parser could be reused. You could certainly use the regexen we define to identify various CSS tokens. My first thought was that combinators should not be allowed in that syntax (i.e. new Element('div#mynode div.someClass'), but then I suppose you could

[Prototype-core] Re: Form.serialize, Ajax.Request, Hash.toQueryString, .toQueryParams

2007-03-26 Thread Andrew Dupont
After a whole bunch of heated discussion about a subject that I had no idea was so controversial, my inclination is to stick to a very spec- compliant and unambitious Hash serializer for 1.5.1. Those who need more out of their serialization (proper handling of nested hashes, arrays, etc.) can

[Prototype-core] Re: Image File Serialize

2007-03-28 Thread Andrew Dupont
Add-on. We're already pushing 100K as it is. Cheers, Andrew On Mar 28, 1:05 pm, Mislav Marohnić [EMAIL PROTECTED] wrote: On 3/28/07, Stefan Liebenberg [EMAIL PROTECTED] wrote: Does anybody know how to send a serialized upload file value thing to your server I tried and i suck. You

[Prototype-core] Re: Adding Selector object to documentation

2007-03-30 Thread Andrew Dupont
Element#getElementsBySelector lets you specify a context node other than the document. (http://prototypejs.org/api/element/methods/ getElementsBySelector) I can only speak for myself, but the reason I haven't felt the need to add any documentation on the Selector class itself is because I can't

[Prototype-core] Re: Adding Selector object to documentation

2007-03-30 Thread Andrew Dupont
On Mar 30, 8:32 pm, Jacob Rockowitz [EMAIL PROTECTED] wrote: Maybe http://www.prototypejs.org/api/utility/dollar-dollar should have a reference to 'Elements.getElementsBySelector'. Good idea. I've updated the $$ page to point to Element#getElementsBySelector and did a little tidying up on

[Prototype-core] Re: Empty catch blocks

2007-04-01 Thread Andrew Dupont
I don't know much about the code in question, but I believe those catch blocks are in place to intercept thrown exceptions that are extraneous (i.e., can occur sporadically without changing the result of the code or have no bearing on the result). I can't be sure, though, so let's take them one

[Prototype-core] Re: Patch For Windows Internet Explorer Having to be Closed to Complete Testing

2007-04-26 Thread Andrew Dupont
The win32ole module is part of stdlib, so no external dependencies needed. *Fantastic* work, dude. I can't wait to try it out. Cheers, Andrew On Apr 26, 5:06 pm, Ryan Schuft [EMAIL PROTECTED] wrote: Hello, I've submitted a ticket with an attached patch to fix the problem on Windows

[Prototype-core] Re: for (var j in ...)

2007-04-26 Thread Andrew Dupont
http://www.andrewdupont.net/2006/05/18/javascript-associative-arrays-considered-harmful/ On Apr 26, 5:27 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Sort of new to prototype, but it seems that when I have a associative array, and do the following: for(var j in myAssocArray){

[Prototype-core] Re: Class.create() and method binding

2007-05-10 Thread Andrew Dupont
Dan Webb wrote: It's not a bad cause, I just think the solution is a performance eater. Imagine: the loop runs on every object instantiation. It wraps every function inside another and it needs $A for that. After that, every function call internally calls another, triggering $A one more

[Prototype-core] Re: Class.create() and method binding

2007-05-10 Thread Andrew Dupont
Would it? ;) The new Event code binds whatever it gets in IE to someElement. It doesn't know anything about Foo. I wasn't being very clear -- sorry. Those first two examples illustrate what would happen if we implemented *both* the stuff in the events branch as it is now *and* Dan's

[Prototype-core] Re: next(Number) slowdown in Internet Explorer (6,7)

2007-05-23 Thread Andrew Dupont
On May 23, 7:16 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: With the latest prototype (1.5.1), the next() function (and probably also prev() and the rest of the navigation function) cause a tremendous slowdown in IE if they are used with the following syntax: next(Number). From what I saw

[Prototype-core] Re: next(Number) slowdown in Internet Explorer (6,7)

2007-05-24 Thread Andrew Dupont
On May 24, 5:53 am, Mislav Marohnić [EMAIL PROTECTED] wrote: Andrew, it doesn't matter - getElementsByClassName tends to extend EVERY node in the document! If that isn't slow I don't know what is. No, it doesn't. It extends only those nodes that match the class name. I've personally spent

[Prototype-core] Re: next(Number) slowdown in Internet Explorer (6,7)

2007-05-25 Thread Andrew Dupont
On May 25, 3:10 am, Mislav Marohnić [EMAIL PROTECTED] wrote: It calls Element.hasClassName for every node, I hope we can agree on that. Now, let us remember what do methods from the Element namespace all have in common. Hint: it has something to do with the first argument and the $ function.

[Prototype-core] Re: Opera and Form.serialize

2007-06-03 Thread Andrew Dupont
On Jun 3, 9:06 am, Mislav Marohnić [EMAIL PROTECTED] wrote: That doesn't make any sense. element.form.serialize should work in FF andOpera because they support native DOM prototypes. It shouldn't work in IE because the form element is not DOM extended by Prototype. And now you're telling us

[Prototype-core] Re: $ function

2007-06-17 Thread Andrew Dupont
On Jun 17, 8:34 am, Mislav Marohnić [EMAIL PROTECTED] wrote: Am I right when saying that this will fail if the ID was dynamically set (in other words, it was not an attribute in HTML source)? Adam's test is correct -- even dynamically-set ID attributes will still be picked up by readAttribute

[Prototype-core] Re: $ function

2007-06-18 Thread Andrew Dupont
On Jun 18, 2:01 am, Mislav Marohnić [EMAIL PROTECTED] wrote: There are only 3 possible options we're facing: 1. Don't change the $ function, leave everything as-is; 2. Fix the issue in $ by using $$('*[id=foo]'); 3. Don't fix the issue, throw error instead. My vote is for #1. The $

[Prototype-core] Re: $ function

2007-06-22 Thread Andrew Dupont
On Jun 21, 6:30 am, Rebecca Blyth [EMAIL PROTECTED] wrote: Finally, an aside on not having control over the HTML source: I ran into this issue when using the radio_button_tag helper method in Rails, which inconveniently used the name of the input as the id - unhelpful, as all the radio

[Prototype-core] Re: bracket notation

2007-06-22 Thread Andrew Dupont
On Jun 21, 2:35 pm, sed [EMAIL PROTECTED] wrote: I'm not sure why this worked before, it must be related to the html/ script being generated into the div from the ajax.updater rather than just being on the page. Nope. It's sillier than that. Let's say you've got an element with an ID of foo

[Prototype-core] Re: Template Class (documentation related)

2007-06-24 Thread Andrew Dupont
It's got nothing to do with luck. Arrays are implemented as a very light veneer on top of Objects; the only real difference between them is the literal syntax ([]) and the magic length property that counts your numeric keys. (In fact, the numeric keys aren't really numbers, since all object

[Prototype-core] Re: Inheritance: your thoughts?

2007-06-25 Thread Andrew Dupont
On Jun 25, 4:41 am, Gareth Evans [EMAIL PROTECTED] wrote: Is Base an option for the naming of the parent class? I'd vote against it assiduously. It was my problem with Dean's original naming as well. In a deep class structure (Organism Animal Cat) it implies that the method being called is

[Prototype-core] Re: Inheritance: your thoughts?

2007-06-25 Thread Andrew Dupont
I agree with everything Mislav said and would adopt that syntax in a heartbeat. My only concern is with the signature of Class.create and Class.extend. I feel like having instance methods and class methods in adjacent arguments can hurt the readability of the code. If you're skimming a file you

[Prototype-core] Re: Inheritance: your thoughts?

2007-06-25 Thread Andrew Dupont
On Jun 25, 11:29 am, Ken Snyder [EMAIL PROTECTED] wrote: I'd also like to throw in the idea that we need to prove the final OO-design decisions with use cases. We can write animal-sounds code all day long, but JavaScript is such a unique language, I think we ought to prove the design by

[Prototype-core] Re: document.getElementByClassName appends undefined elements

2007-07-02 Thread Andrew Dupont
for(element in elements) { That's the problem. Use elements#each [1] or a for loop with an index to iterate through arrays. You can read more about this issue here [2]. Cheers, Andrew [1] http://prototypejs.org/api/enumerable/each [2]

[Prototype-core] Re: Syntax question

2007-07-04 Thread Andrew Dupont
On Jul 4, 1:52 pm, Vincent [EMAIL PROTECTED] wrote: I agree on the multiple declaration syntax, but in the cases above, those variables have already been declared earlier in the code and are simply assigned new values in the reported lines. Yeah, it's a mistake, but it's an innocuous one.

[Prototype-core] Re: : in '#myForm:myText' is not recognized when using CSS selector function

2007-07-11 Thread Andrew Dupont
Have you tried *[id='myForm:myName']? That ought to work, though it wouldn't surprise me if it did not. A colon is a valid character in ID attributes, so it should be supported. Part of me thinks that the attribute selector approach (if it works) would be sufficient -- but another part of me

[Prototype-core] Re: Event.observe will destroy the scope of Javascript OOP?

2007-07-13 Thread Andrew Dupont
This will nonetheless be fixed in Prototype 1.6 -- Event.observe will automatically fix scope. Cheers, Andrew On Jul 13, 12:42 am, Paladin [EMAIL PROTECTED] wrote: Thanks. Sometimes when bugs pop out it's really difficult to tell where they come from.=) On Jul 12, 4:46 pm, jdalton [EMAIL

[Prototype-core] Re: Unique Arrays

2007-08-05 Thread Andrew Dupont
Wherever it makes sense, Prototype follows Ruby's general philosophy, and that includes naming scheme. If the most confusing result is that someone expects unique instead of uniq, that's a gambit I'm willing to make. A developer would immediately know what uniq means upon reading documentation.

[Prototype-core] Re: prototype and js-packer

2007-08-07 Thread Andrew Dupont
No - that'd be incorrect in both cases. Semicolons are needed when a line is ended with the closing brace of a function literal or object literal, but not when a line is ended with the closing brace of a control structure. Cheers, Andrew On Aug 7, 1:09 pm, Mislav Marohnić [EMAIL PROTECTED]

[Prototype-core] Re: Predefined custom events handled as 'dataavailable' (1.6.0_rc0)

2007-08-17 Thread Andrew Dupont
This is probably the most glaring flaw in RC0: any event types that are not part of the DOM L2 Events spec, but are nonetheless honored by one or more browsers, are handled incorrectly by Prototype as custom events. We've got to figure out a way around this, even if it means we create a

[Prototype-core] Re: simulated DOMContentReady event

2007-08-31 Thread Andrew Dupont
On Aug 31, 2:12 am, Mislav Marohnić [EMAIL PROTECTED] wrote: On 8/31/07, Jeff Watkins [EMAIL PROTECTED] wrote: Let me see if I'm getting this correctly. You are saying that you need to inject content in the DOM received by XHR ... while the current page is still being loaded? That is

[Prototype-core] Re: simulated DOMContentReady event

2007-09-01 Thread Andrew Dupont
On Sep 1, 5:18 pm, Nicolás Sanguinetti [EMAIL PROTECTED] wrote: Anyway, the custom event solution seems tidy enough. What do the w3c specs say on xmlhttprequests and contentloaded, if anything? They don't. Despite its name, the DOMContentLoaded event is not part of any standard.

[Prototype-core] Re: Opera contentLoaded gotcha with external stylesheets.

2007-09-05 Thread Andrew Dupont
That very blog post points to HTML5 work on the issue. If you're brave, Mislav, you could ask for a spec clarification on the HTML5 mailing list. Cheers, Andrew On Sep 5, 10:20 am, Mislav Marohnić [EMAIL PROTECTED] wrote: On 9/5/07, jdalton [EMAIL PROTECTED] wrote: I just saw a post on

[Prototype-core] Re: :not() selector bugs

2007-09-26 Thread Andrew Dupont
The CSS2 and CSS3 specs disagree on this, annoyingly enough. [1] I'd originally written :not to throw an exception on selectors with more than one token, but then I saw the conflicting definitions and relented. All the other major libraries seem to allow this confusing syntax. Not being able to

[Prototype-core] Re: Any reasons for not including String#size ?

2007-09-30 Thread Andrew Dupont
The size method comes from Enumerable#size. Array and Hash both have it because they both mixin Enumerable, of course. It's a type-agnostic way to get the number of items in a collection, since not all collections have a length property. This isn't the case for strings. Strings always have a

[Prototype-core] Re: Event methods' bug in Internet Explorer

2007-10-11 Thread Andrew Dupont
Gah. That's not good. We need to follow the same pattern used in all the Element instance methods: start by extending the event, just in case it isn't extended yet. That way, calls to generics are guaranteed to be safe. I'll fix this over the weekend if nobody else gets to it first. Cheers,

[Prototype-core] Re: Getting patches reviewed and applied

2007-10-14 Thread Andrew Dupont
Historically the JS libraries haven't seen enough patch volume to justify the process overhead. I feel like we're turning the corner there, though; we should probably start following the Report 12 process for Prototype. What does the rest of Core think? Any message that proposes a new feature is

[Prototype-core] Re: combinator selectors in Element#select

2007-10-17 Thread Andrew Dupont
I'm not crazy about it. Deviations from the CSS3 spec are troublesome because they're not discoverable and they violate POLS. If we're going to go down that slippery slope, selector.js will get even larger than it already has. The extended Enumerable#grep semantics in 1.6 make kangax's

[Prototype-core] Re: Scripaculous 1.8 compressed?

2007-11-01 Thread Andrew Dupont
Prototype script.aculo.us don't release official compressed versions, but there are a few different people who make unofficial compressed versions for each major release. I'm sure one will be available shortly after the 1.6 final release (which will be soon). Cheers, Andrew On Nov 1, 8:25 pm,

[Prototype-core] Re: $super and Function.toString()

2007-11-11 Thread Andrew Dupont
There are other popular scripts that rely on this behavior, most notably Dean Edwards's original base.js inheritance script. It should also be noted that this behavior does not comply with ECMA-262, which states that Function.prototype.toString shall return a string that has the syntax of a

[Prototype-core] Re: Improving document.viewport.getDimensions()

2007-11-14 Thread Andrew Dupont
Great work, Nick. I'll take a look at this patch when I get a chance. Cheers, Andrew On Nov 13, 3:01 pm, Nick Stakenburg [EMAIL PROTECTED] wrote: I'm hoping document.viewport.getDimensions() can be improved. At the moment I'm using a patched version in a

[Prototype-core] Re: features request

2007-11-22 Thread Andrew Dupont
On Nov 22, 10:29 am, Mislav Marohnić [EMAIL PROTECTED] wrote: Because of the silence of other core members at the moment, Keep in mind the western faction has been asleep, and it is a holiday in America. ;-) it would be best for you to make a plug-in script that is included after

[Prototype-core] Re: features request

2007-11-22 Thread Andrew Dupont
On Nov 22, 6:21 pm, Mislav Marohnić [EMAIL PROTECTED] wrote: While maybe not a good fit for core (most of the users wouldn't use it), those seem definitely useful. I'll hope you'll still share them somehow (public dir in your svn repo is an option). I'd like to emphasize this. Despite the

[Prototype-core] Re: Version 1.6 and XPath in Safari/WebKit 3

2007-11-27 Thread Andrew Dupont
The Selector class translates to XPath in browsers that support it. Some of the Selector unit tests failed in Safari 3 -- seemingly because WebKit doesn't correctly implement some XPath functions. If I recall, the failures are related to the :first-of-type/:first-child pseudoclasses (and their

[Prototype-core] Re: Array slices and Object.isObject|isBoolean

2007-11-27 Thread Andrew Dupont
I don't know how useful Object.isObject would be, since it could arguably return true for anything that reports its type as object. Otherwise we'd be using some different definition of object, and that would violate POLS. And I can't imagine a use case for Object.isBoolean -- you've got the

[Prototype-core] Re: Fwd: [prototype-core] Event#unloadCache not available in 1.6.0

2007-12-12 Thread Andrew Dupont
I think our official recommendation is that anyone who needs Event.unloadCache should write it and make its contents the same as that of destroyCache. The code duplication is small enough that it doesn't bother me; anyone who's doing proactive GC probably has written enough JS already that they

[Prototype-core] Re: iterator -- offer to help with documentation

2007-12-12 Thread Andrew Dupont
Right now, the arguments are named the same way they're named in the source code. I don't think that convention is worth abandoning. As for the arguments expected by the iterator: perhaps we could document these on a separate line in the same EBNF block? I think the nesting would cause more

[Prototype-core] Re: Development Roadmap

2008-01-07 Thread Andrew Dupont
On Jan 7, 2:54 pm, Michael Peters [EMAIL PROTECTED] wrote: Mislav Marohnić wrote: On Jan 7, 2008 9:25 PM, Ken Snyder [EMAIL PROTECTED] Some ideas are shared with the community while some are kept private for further discussions among core members. Why the secrecy? This is an open

[Prototype-core] Re: New Element()

2008-01-11 Thread Andrew Dupont
I think he meant it as a workaround, not as a bug fix. Thanks, David! Cheers, Andrew On Jan 10, 11:06 am, Mislav Marohnić [EMAIL PROTECTED] wrote: In other words, you eliminated the cache? We would rather fix the problem than lose the cache (and the speed increase it provides). You could

[Prototype-core] Re: methodize parseInt parseFloat

2008-01-29 Thread Andrew Dupont
On Jan 29, 3:41 am, artemy tregoubenko [EMAIL PROTECTED] wrote: Well, I'm using this one: Object.extend(String.prototype, {         parseInt: parseInt.methodize(),         parseFloat: parseFloat.methodize(), }); Clever. :-) In ECMAScript 4, parseInt and parseFloat are becoming static

[Prototype-core] Re: Can the Enumarable iterators be changed to accept scope as the first param (optionally)

2008-02-07 Thread Andrew Dupont
Thanks for writing about this. I think it's an interesting idea, but is almost certainly infeasible because we need to abide by an existing API. JavaScript 1.6 (Firefox = 1.x) introduced some functional array methods, including one called map which does the exact same thing as our

[Prototype-core] Re: Prototype and Caja

2008-02-08 Thread Andrew Dupont
On Feb 6, 6:14 am, Ben Laurie [EMAIL PROTECTED] wrote: So, I was wondering: a) How the core team feel about this? b) Whether there's anyone that would be interested in working with us to make this happen? Ben, I can only speak for myself and not the rest of the Core team, but as long as

[Prototype-core] Re: $_SESSION of PHP doesn't work with AJAX

2008-03-28 Thread Andrew Dupont
On Mar 27, 9:29 pm, Nouv Vitou [EMAIL PROTECTED] wrote: But if I have two different domains taiyocambodia.com and khmer-web.com. I would like to use the session to be used for both. How can I? Can't do it with cookies. Track your sessions on the server-side. Again let me suggest that this

[Prototype-core] Re: Using GIT

2008-04-25 Thread Andrew Dupont
http://github.com/sstephenson/prototype/ http://github.com/madrobby/scriptaculous/ Those are the GitHub pages for Proto/Scripty, respectively. Those pages have the repo URLs for each — or you can download tarballs from there if you're not keen on git. Everything else works the same way.

[Prototype-core] Re: IE onmouseleave

2008-06-12 Thread Andrew Dupont
[1] http://msdn.microsoft.com/en-us/library/ms536956(VS.85).aspx [2] http://msdn.microsoft.com/en-us/library/ms536910(VS.85).aspx (Just pretend I included these in the original message.) On Jun 12, 8:20 pm, Andrew Dupont [EMAIL PROTECTED] wrote: On Jun 12, 5:46 am, Nick Stakenburg [EMAIL

[Prototype-core] Re: status: Where we're at

2008-08-29 Thread Andrew Dupont
I'm committed to releasing before The Ajax Experience at the end of September. Obviously we'd like to release sooner, but both Christophe and I will be attending that conference and presenting on Prototype, so it behooves us to close some glaring bugs in The main problem is that

[Prototype-core] Re: lighthouse marked my ticket as spam

2008-09-01 Thread Andrew Dupont
I think this was during the one day that Lighthouse's spam verification service went down and it was marking everything as spam. Would you mind re-submitting the ticket? I can't seem to find a way to un-mark it. Thanks, Andrew On Sep 1, 9:34 am, Ihárosi Wiktor [EMAIL PROTECTED] wrote: Hi, I

[Prototype-core] Re: Firefox 2.0.0.x Event.element()

2008-09-02 Thread Andrew Dupont
I believe we've fixed this since 1.6.0. Update to and see if it still happens. Cheers, Andrew On Sep 2, 8:47 am, therutz [EMAIL PROTECTED] wrote: Using prototype.js 1.6.0 and Firefox 2.0.0.x and Event.element() returns the wrong element. Instead of an HTMLImageElement it's returning

[Prototype-core] Re: isNumber or Not A Number ??

2008-09-02 Thread Andrew Dupont
Because typeof NaN is number. Other people have complained about this, so we may change it in a future version. Cheers, Andrew On Sep 2, 8:25 pm, EMoreth [EMAIL PROTECTED] wrote: Could someone tell me why Object.isNumber(NaN) returns TRUE ?? Shouldnt this be false ?? EMoreth

[Prototype-core] Re: status: Where we're at

2008-09-22 Thread Andrew Dupont
On Sep 22, 7:16 pm, Valentin [EMAIL PROTECTED] wrote: I didn't hijacked anyone's thread. This is about the upcoming so what I posted is directly related. The purpose of a JS library is to 1) provide compatibility among browsers using the same code 2) reduce the time the programmer

[Prototype-core] Re: Official (or unofficial) compressed version of Prototype 1.6?

2008-10-03 Thread Andrew Dupont
Google's version is gzipped. Prototype 1.6, when gzipped, is only 28K over the wire. And with Google's content distribution network and proper cache settings, it'll be downloaded only once. This is what people should be using if they want a compressed version.

[Prototype-core] Re: Official (or unofficial) compressed version of Prototype 1.6?

2008-10-07 Thread Andrew Dupont
The gzipped version hosted on Google's servers is 28K; JDD's packed- and-gzipped version in ProtoPack is 24K. I don't think it's worth the trouble. Cheers, Andrew On Oct 7, 12:40 pm, Shadow [EMAIL PROTECTED] wrote: I would be great if core team can add a minified version to the google api, I

[Prototype-core] Re: Bug : Object.isNumber() and Hash.toQueryString()

2008-10-08 Thread Andrew Dupont
I shall end the shitstorm here and now. To quote the rhino book: Once we've created a string object S [through `new String`], what can we do with it? Nothing that we cannot do with the corresponding primitive string value. If we use the `typeof` operator, it tells us that S is indeed an object,

[Prototype-core] Re: Bug : Object.isNumber() and Hash.toQueryString()

2008-10-08 Thread Andrew Dupont
for the `typeof` problem. If the fix weren't so simple I'd have pushed back hard. Cheers, Andrew On Oct 8, 2:15 pm, Tom Gregory [EMAIL PROTECTED] wrote: On Oct 8, 2008, at 11:29 AM, Andrew Dupont wrote: I shall end the shitstorm here and now. ... he probably can't think of a single case

[Prototype-core] Re: Prototype.js ( breaks Firebug (1.2.1) Options allegedly.

2008-10-14 Thread Andrew Dupont
Only in the sense that Prototype seems not to be safe to use inside a Firefox extension. But even that isn't clear. I posted in the thread to try to cut through the hearsay and speculation. Thanks, Richard. Cheers, Andrew On Oct 14, 8:49 am, Richard Quadling [EMAIL PROTECTED] wrote: Hi.

[Prototype-core] Re: Contributing to the Prototype Documentation

2008-10-15 Thread Andrew Dupont
Write up your proposed additions in a text file, create a ticket on Lighthouse, and attach your additions as a patch. Thanks! Cheers, Andrew On Oct 13, 1:08 pm, ijayasin [EMAIL PROTECTED] wrote: Hi, I was wondering how people could contribute to the Prototype documentation. One part of

[Prototype-core] Re: Style Guide for rewrite branch

2008-11-13 Thread Andrew Dupont
Here's what this would look like when genericized into an imaginary API: http://gist.github.com/24571 A couple of things: (1) I'm altogether in favor of this new approach, but it will result in less implicit organization of code. A reader of the code will likely find it harder to scan for the

[Prototype-core] Re: Style Guide for rewrite branch

2008-11-16 Thread Andrew Dupont
On Nov 16, 1:58 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Here is my take, I'm also altogether with this incoming pattern. PDoc blocks could indeed demarcate those sections, and be used to provide (browser|feature)-specific technical documentation. My proposal is the following

[Prototype-core] Prototype in 10 steps... what are they?

2008-11-17 Thread Andrew Dupont
I'm thinking about how we can flatten the learning curve. If you were to teach someone how to use Prototype in 10 incremental steps, what would they be? I've got only nine so far, but here they are: 1. Master the $ Function 2. Use instance methods to perform common tasks on elements 3. Master

[Prototype-core] Re: Prototype in 10 steps... what are they?

2008-11-18 Thread Andrew Dupont
On Nov 18, 4:11 am, T.J. Crowder [EMAIL PROTECTED] wrote: That list falls neatly into two categories: Basic techniques not requiring *too* much in terms of conceptual understanding (the first five items), then more conceptual (and powerful) stuff (the last five items). I probably would

[Prototype-core] New Element.Layout API

2009-01-16 Thread Andrew Dupont
I've just committed a couple large API additions in a layout branch in our Git repository: http://github.com/sstephenson/prototype/tree/layout http://github.com/sstephenson/prototype/blob/9d28f04d98307f652a2d85ff35e869f2e0ac7f38/src/dom/layout.js It's still very preliminary, but Element.Layout

[Prototype-core] Re: Permission denied error from 'rake doc'

2009-04-03 Thread Andrew Dupont
to and pointed TEMP/TMP at it instead.  The directory got used, but I got the same result. -- T.J. :-) On Mar 31, 6:23 am, Andrew Dupont goo...@andrewdupont.net wrote: Christ, that's weird. It's saying you don't have permission to read the temporary file we create to build

[Prototype-core] Re: Permission denied error from 'rake doc'

2009-04-03 Thread Andrew Dupont
*headdesk* Had local changes to my PDoc checkout that I had not pushed back to the repo. Fixed now. git pull git submodule update ...should do the trick. Cheers, Andrew On Apr 3, 9:28 am, T.J. Crowder t...@crowdersoftware.com wrote: Hi Richard, I'm really stumped here. I wonder if the

[Prototype-core] Re: Permission denied error from 'rake doc'

2009-04-03 Thread Andrew Dupont
is a bug in Sprockets that I've passed along to Sam, so expect a fix for that sometime soon. T.J., let me know if you have any further problems. Cheers, Andrew On Apr 3, 11:22 am, Andrew Dupont goo...@andrewdupont.net wrote: *headdesk* Had local changes to my PDoc checkout that I had not pushed

[Prototype-core] Re: Permission denied error from 'rake doc'

2009-04-07 Thread Andrew Dupont
Language Section from the menu, if I click on $A on the Utilities line on the page, I get a 404 for language \dollara.html. Haven't had a chance to try Ubuntu yet. -- T.J. On Apr 3, 6:56 pm, Andrew Dupont goo...@andrewdupont.net wrote: OK, once I commented out that File.utime

[Prototype-core] Re: Permission denied error from 'rake doc'

2009-04-08 Thread Andrew Dupont
On Apr 8, 2:26 am, Richard Quadling rquadl...@googlemail.com wrote: Having refreshed my prototype checkout (along with the submodules), the sprockets issue is still present. Ball's still in Sam's court on that one. If it doesn't get fixed soon I'll ask him for commit access to the Sprockets

[Prototype-core] Re: Permission denied error from 'rake doc'

2009-04-09 Thread Andrew Dupont
On Apr 9, 2009, at 3:30 AM, Richard Quadling wrote: Being VERY new to using Ruby, is there a realtime debugger I could use (ideally stepwise execution with rollback, but that may be asking a lot!). Being able to provide a patch will help move things along a bit. Best option is the

  1   2   >