[Prototype-core] Re: Detecting CTRL keydown

2008-03-07 Thread T.J. Crowder
Perhaps pick up the discussion (if further discussion is needed) in your cross-posted thread in spinoffs http://groups.google.com/group/rubyonrails-spinoffs/browse_thread/thread/7180c33718757180/3834d5597f575299#3834d5597f575299 On Mar 6, 8:24 pm, louis w [EMAIL PROTECTED] wrote: Sorry, did

[Prototype-core] Re: javascript performance/ optimization

2008-03-09 Thread T.J. Crowder
about the script parsing, well, it's easy enough to find out. Disable all of the script stuff but leave the script in, get some timings, then remove the link to the script. :) Hope this helps, -- T.J. Crowder tj / crowder software / com On Mar 9, 9:53 am, Thierry [EMAIL PROTECTED] wrote: Hey

[Prototype-core] Re: String.prototype.exec()

2008-03-24 Thread T.J. Crowder
...even though you haven't found any... s/you/the author (needed more coffee before posting) -- T.J. ;-) On Mar 24, 11:36 am, T.J. Crowder [EMAIL PROTECTED] wrote: It's an interesting implementation; would need some cleanup, IMHO. The things I see off-hand are: 1. window

[Prototype-core] Re: Utility method and frames

2008-04-27 Thread T.J. Crowder
(I've never tried, you may well run into security provisions), but if you did you'd need to use the document in the other frame rather than the window... Hope this helps, -- T.J. Crowder tj / crowder software / com On Apr 26, 12:15 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, i try to observe

[Prototype-core] Re: Extend Element.setStyle to support CSS class name as parameter

2008-05-21 Thread T.J. Crowder
Sébastien, (Have you given up tennis in favor of software development?) What would this offer over using Element.addClassName -- e.g., over using the browser's own style handling? -- T.J. Crowder tj / crowder software / com On May 21, 2:15 pm, Sébastien Grosjean - ZenCocoon [EMAIL PROTECTED

[Prototype-core] Array.indexOf and strict equality

2008-06-06 Thread T.J. Crowder
length = this.length; if (i 0) i = length + i; for (; i length; i++) if (this[i] === item) return i; return -1; }; So I'll file a ticket, my only question is whether I should file it against the code or the docs. ;-) -- T.J. Crowder tj / crowder software / com

[Prototype-core] Re: typeof returning object for certain 'native' functions in IE

2008-06-06 Thread T.J. Crowder
. -- T.J. Crowder tj / crowder software / com On Jun 6, 12:51 pm, kangax [EMAIL PROTECTED] wrote: I wish it was that easy : ) Unfortunately, we can't really account for all host objects, which are notorious for their incompliance with specs (e.g. it's well known how some of them have no constructor

[Prototype-core] Re: Array.indexOf and strict equality

2008-06-06 Thread T.J. Crowder
documentation was updated : / - kangax On Jun 6, 8:34 am, T.J. Crowder [EMAIL PROTECTED] wrote: Gah! Sorry, I should have looked. FWIW, have to disagree with the low/minor categorization. It's not just that it doesn't say, it's that it explicitly does say the wrong thing... Are the docs

[Prototype-core] Re: typeof returning object for certain 'native' functions in IE

2008-06-06 Thread T.J. Crowder
no call for this (yet). Committers, please correct me if I'm wrong there. -- T.J. Crowder tj / crowder software / com On Jun 6, 2:38 pm, Richard Quadling [EMAIL PROTECTED] wrote: 2008/6/6 T.J. Crowder [EMAIL PROTECTED]: Yeah, Richard's approach would be about eight times more elegant

[Prototype-core] Re: Array.indexOf and strict equality

2008-06-07 Thread T.J. Crowder
Ah, yes, now that Prototype is using Git, things like this are a lot easier... -- T.J. :-) On Jun 6, 8:51 pm, Andrew Dupont [EMAIL PROTECTED] wrote: On Jun 6, 9:13 am, T.J. Crowder [EMAIL PROTECTED] wrote: Yeah, I'm really excited by the pdoc effort. (I can't say I like the syntax

[Prototype-core] Re: Ajax.Request causing Socket Exception on Weblogic 9.2

2008-06-16 Thread T.J. Crowder
@All: He's already reposted this to the prototype forum, so you can ignore it here. -- T.J. Crowder tj / crowder software / com On Jun 16, 6:22 pm, krichnaf [EMAIL PROTECTED] wrote: I have an Ajax.Request call [snip] --~--~-~--~~~---~--~~ You received

[Prototype-core] Re: New Name for Users Group (RoR Spinoffs)

2008-06-17 Thread T.J. Crowder
On Jun 17, 8:46 pm, kangax [EMAIL PROTECTED] wrote: Why not just Prototype Scriptaculous? Just to differentiate from Core. -- T.J. Crowder tj / crowder software / com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

[Prototype-core] Re: New Name for Users Group (RoR Spinoffs)

2008-06-18 Thread T.J. Crowder
-but- probably-appropriate Prototype Scriptaculous with a group comment giving each URL. -- T.J. Crowder tj / crowder software / com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype: Core group. To post to this group

[Prototype-core] Re: Prototype's use of global variables

2008-08-18 Thread T.J. Crowder
environment doesn't provide it (such as the new Array stuff), obviously we wouldn't prefix that as the whole point is to not worry about whether the host environment provides the function. -- T.J. Crowder tj / crowder software / com On Aug 18, 4:27 pm, John-David Dalton [EMAIL PROTECTED] wrote

[Prototype-core] Re: Prototype's use of global variables

2008-08-19 Thread T.J. Crowder
, for instance _: * * * * var wel; wel = $('mydiv'); if (wel._.childNodes.length == 0) { wel.update('p class=noteNo content/p); } * * * * ...but that gets pretty cryptic pretty quickly. Mind you, the code does look a bit like it's smiling at us. ;-) All told, I think raw makes good sense. -- T.J

[Prototype-core] Re: Element wrapper draft notes

2008-08-21 Thread T.J. Crowder
'); list = items.source; for (n = 0; n list.length; ++n) { list[n].update('This is item ' + n); } ...because although I'm accessing the raw list, it contains wrapped nodes. Is that the idea? -- T.J. Crowder tj / crowder software / com On Aug 21, 6:37 am, kangax [EMAIL PROTECTED

[Prototype-core] Re: Element wrapper draft notes

2008-08-21 Thread T.J. Crowder
items are part of its indexed properties. If it's not literally a wrapper, if it's a replacement, that's great and it's certainly the simplest solution. But we keep calling it a wrapper, which is the only reason for the question about indexed access. -- T.J. Crowder tj / crowder software / On Aug

[Prototype-core] Re: Element wrapper draft notes

2008-08-21 Thread T.J. Crowder
continue its recursive descent even after it has what you want, and then it goes and puts a list around it, all to be thrown away because you're just going to use the first element anyway. FWIW. -- T.J. :-) On Aug 21, 3:45 pm, kangax [EMAIL PROTECTED] wrote: On Aug 21, 9:21 am, T.J. Crowder

[Prototype-core] Re: Element wrapper draft notes

2008-08-22 Thread T.J. Crowder
This made me think about lazy initialization of NodeListWrapper's. The two options seem to be: 1) store an array of pure elements and turn them into wrappers on the fly 2) turn elements into wrappers when instantiating `NodeListWrapper` and then return these (already prepared) wrappers.

[Prototype-core] Re: Element wrapper draft notes

2008-08-22 Thread T.J. Crowder
extended until/unless I actually use them). If I use $$W(), I'll get the new Prototype.NodeList with all of the elements pre-wrapped. Is that the idea going forward? -- T.J. :-) On Aug 22, 1:15 pm, kangax [EMAIL PROTECTED] wrote: On Aug 22, 7:14 am, T.J. Crowder [EMAIL PROTECTED] wrote: This made

[Prototype-core] Re: Element wrapper draft notes

2008-08-22 Thread T.J. Crowder
When iterating over a `source` items, we don't know if an item is a wrapper or an element. My _each implementation deals with that case pretty efficiently. The ongoing runtime cost of item() and _each() is pretty much one extra comparison. Before we can do benchmarks, we should ask people

[Prototype-core] Re: Element wrapper draft notes

2008-08-22 Thread T.J. Crowder
@JDD: Sorry, missed your note in the melee. T.J. $$W and $$ are the same thing (just named $$W so that we know we are talking about the new implementation). Depending on how $$W is implemented, I may pretty strongly want Prototype's excellent selectors but without automatic element wrapping.

[Prototype-core] Re: Element wrapper draft notes

2008-08-22 Thread T.J. Crowder
. :-) On Aug 22, 9:56 pm, Ken Snyder [EMAIL PROTECTED] wrote: kangax wrote: On Aug 22, 11:30 am, T.J. Crowder [EMAIL PROTECTED] wrote: I'm not sure if we should pre-wrap elements or do the lazy init. First approach hits the memory consumption, while second - run-time performance. We'll need

[Prototype-core] Re: Foreach Loops

2008-09-12 Thread T.J. Crowder
; // ... myNiftyFilter = createFilter(Object.isString, function(x) { alert(Filter: + x); }); // ... a = [1, two, 3, 4, five]; a.each(myNiftyFilter); // Alerts Filter: two and then Filter: five FWIW, -- T.J. Crowder tj / crowder software / com On Sep 12, 10:03 am, Josi [EMAIL

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

2008-09-23 Thread T.J. Crowder
to submit a bug, or how to compile prototype. So if you want you can submit this yourself ... ...which is seriously uncool, so I called you on it. Move along, nothing to see here. -- T.J. Crowder tj / crowder software / com On Sep 23, 1:16 am, Valentin [EMAIL PROTECTED] wrote: I didn't hijacked

[Prototype-core] Re: Break from Enumerate return statement fails

2008-10-04 Thread T.J. Crowder
Karl, Use of $break is not deprecated. Use of $continue is deprecated (just use a return statement). But if you want to break the loop, you still throw $break: http://www.prototypejs.org/api/enumerable/each -- T.J. Crowder tj / crowder software / com On Oct 4, 8:43 am, kstubs [EMAIL PROTECTED

[Prototype-core] Re: How to tell if element event is observed

2008-10-05 Thread T.J. Crowder
had to issue one blind like that, but it just returns without doing anything if it doesn't find an observer to drop. -- T.J. Crowder tj / crowder software / com On Oct 5, 1:00 am, kstubs [EMAIL PROTECTED] wrote: So, just keep track of them with a typical variable? var myElementIsObserved = false

[Prototype-core] Re: Delay Documentation

2008-10-18 Thread T.J. Crowder
the delay function on the function object. It could be written in two steps for clarity: var f = function() { obj.hide() }; f.delay(WaitObj.wait); -- T.J. Crowder tj / crowder software / com On Oct 17, 8:26 am, kstubs [EMAIL PROTECTED] wrote: Hi, Thanks for the site!  (throwing that out there before

[Prototype-core] Roadmap

2008-10-23 Thread T.J. Crowder
that using wrappers rather than extending native prototypes is on the cards, and inline documentation, both of which (IMHO) are very good moves. What else? Plans can change, of course, but the absense of a plan leads to meandering Thanks, -- T.J. Crowder tj / crowder software / com

[Prototype-core] Re: Roadmap

2008-10-25 Thread T.J. Crowder
an idea what the plans were. Dates would be nice, but with this kind of project, I don't know how realistic having dates on milestones is. -- T.J. :-) On Oct 24, 12:32 am, kangax [EMAIL PROTECTED] wrote: On Oct 23, 5:12 pm, T.J. Crowder [EMAIL PROTECTED] wrote: Hi folks, Now that 1.6.0.3

[Prototype-core] Re: help needed on Protosafe

2008-10-25 Thread T.J. Crowder
Hi, SORRY, I know that its a CORE forum but I can't find any 'users group' or 'user forum', so posting here. Really? There's a link to it on the Prototype website's discuss page. Here: http://groups.google.com/group/prototype-scriptaculous -- T.J. Crowder tj / crowder software / com On Oct

[Prototype-core] Deprecated API documentation

2008-10-26 Thread T.J. Crowder
]). Seems like that would be fairly clear. Strikeout is still fairly readable, but it makes the point of something having been removed. -- T.J. Crowder tj / crowder software / com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

[Prototype-core] Re: Deprecated API documentation

2008-10-27 Thread T.J. Crowder
Hi folks, Thanks for the input. I'll go with [deprecated], and with strikethrough if the end result looks good, as that's a pretty common use of strikethrough in dev communities. If people don't like the end result, feel free to raise a new ticket. :-) Thanks, -- T.J. Crowder tj / crowder

[Prototype-core] Re: Handling AJAX 'connection refused' across browsers

2008-10-27 Thread T.J. Crowder
.); } } }); new Ajax.PeriodicalUpdater(target, url, options); } (Untested) I bet there's a cleaner solution, though. -- T.J. Crowder tj / crowder software / com On Oct 27, 5:06 pm, DNS [EMAIL PROTECTED] wrote: I have a PeriodicalUpdater that refreshes the contents of a div

[Prototype-core] Re: Handling AJAX 'connection refused' across browsers

2008-10-27 Thread T.J. Crowder
Sorry, just realized what group this message is in. Probably better to post over in the user's discussion group: http://groups.google.com/group/prototype-scriptaculous This group is for discussions of Prototype core development only. -- T.J. Crowder tj / crowder software / com On Oct 27, 5:06

[Prototype-core] Re: Handling AJAX 'connection refused' across browsers

2008-10-27 Thread T.J. Crowder
are! Yeah, that was a big part of what drew me to Prototype, too. -- T.J. Crowder tj / crowder software / com On Oct 27, 5:25 pm, DNS [EMAIL PROTECTED] wrote: I'll just check the status for now and wait for 1.6.1.  By the way, I've been using Prototype for a while, and this is the first time I've

[Prototype-core] Re: Small fix in Element.setStyle()

2008-10-28 Thread T.J. Crowder
opacity (and float). [1] http://www.prototypejs.org/api/element/setStyle If there's still a problem with the latest, would you file a bug report (and even better, a patch!): http://www.prototypejs.org/contribute Thanks again, -- T.J. Crowder tj / crowder software / com On Oct 27, 5:58 pm, Gusmão

[Prototype-core] Re: Ajax.Responders.register an onFailure

2008-10-29 Thread T.J. Crowder
Hi, The docs say All callbacks in the life-cycle are available.[1] Have you tried registering an onFailure and it hasn't worked even though the request's own onFailure was called? [1] http://www.prototypejs.org/api/ajax/responders FWIW, -- T.J. Crowder tj / crowder software / com On Oct 29

[Prototype-core] Re: Memory Leak on IE

2008-10-30 Thread T.J. Crowder
which elements within the element being replaced are being watched, you might look at event delegation instead, which involves fewer handlers placed at a higher (e.g., container) level. FWIW, -- T.J. Crowder tj / crowder software / com On Oct 30, 7:57 am, Yee Keat Phuah [EMAIL PROTECTED] wrote: Hi

[Prototype-core] Re: Memory Leak on IE

2008-10-30 Thread T.J. Crowder
Looks like Firefox already has it: https://developer.mozilla.org/En/DOM_Events Googling DOMNodeRemovedFromDocument site:microsoft.com brings no joy, however. :-) -- T.J. Crowder tj / crowder software / com On Oct 30, 9:02 am, T.J. Crowder [EMAIL PROTECTED] wrote: Hi, FWIW, I don't think

[Prototype-core] Re: Memory Leak on IE

2008-10-30 Thread T.J. Crowder
may differ. :-) -- T.J. Crowder tj / crowder software / com On Oct 30, 9:41 am, Yee Keat Phuah [EMAIL PROTECTED] wrote: Hi, On Thu, Oct 30, 2008 at 5:02 PM, T.J. Crowder [EMAIL PROTECTED] wrote: FWIW, I don't think this is a bug in Prototype.  Prototype keeps track of the event handlers

[Prototype-core] Re: Memory Leak on IE

2008-10-30 Thread T.J. Crowder
and clears observers from it and all of its descendants, like the OP's select(*) or ideally something more efficient using the cache internal to prototype. Then in situations where you know some things are hooked, you can do: $('container').purgeObservers().update(newcontent); -- T.J. Crowder tj

[Prototype-core] Re: Prototype.js mistakes

2008-11-08 Thread T.J. Crowder
-standard behavior not implemented by other browsers (IE and Safari, for instance). [1] http://www.prototypejs.org/contribute [2] http://www.ecma-international.org/publications/standards/Ecma-262.htm -- T.J. Crowder tj / crowder software / com On Nov 8, 7:04 am, Yaffle [EMAIL PROTECTED] wrote: var

[Prototype-core] Re: Prototype.js mistakes

2008-11-09 Thread T.J. Crowder
} ...to avoid the HTML parser ending the script early. -- T.J. Crowder tj / crowder software / com On Nov 9, 5:33 am, kangax [EMAIL PROTECTED] wrote: On Nov 8, 6:14 am, T.J. Crowder [EMAIL PROTECTED] wrote: Yaffle, (Just FWIW, I sense you're not a native English speaker, so I'll just mention

[Prototype-core] Re: new Effect with onComplete

2008-11-11 Thread T.J. Crowder
Hi, You'll want to post to the user's group: http://groups.google.com/group/prototype-scriptaculous This groups is for core development discussion, not end user questions. HTH, -- T.J. Crowder tj / crowder software / com On Nov 11, 10:26 am, cleriker [EMAIL PROTECTED] wrote: Hi there, i

[Prototype-core] Style Guide for rewrite branch

2008-11-12 Thread T.J. Crowder
what's going on. -- T.J. Crowder tj / crowder software / com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype: Core group. To post to this group, send email to prototype-core@googlegroups.com To unsubscribe from

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

2008-11-15 Thread T.J. Crowder
name. (ECMA spec[1], section 13.) [1] http://www.ecma-international.org/publications/standards/Ecma-262.htm -- T.J. Crowder tj / crowder software / com On Nov 15, 7:43 am, artemy tregubenko [EMAIL PROTECTED] wrote: On Fri, 14 Nov 2008 01:59:07 +0300, kangax [EMAIL PROTECTED] wrote: My only

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

2008-11-18 Thread T.J. Crowder
. -- T.J. Crowder tj / crowder software / com On Nov 18, 5:56 am, Andrew Dupont [EMAIL PROTECTED] wrote: 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

[Prototype-core] Cloned repo via git, not seeing the unit test html files

2009-03-20 Thread T.J. Crowder
at it or give me an idea where I may have gone astray? Thanks in advance, -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

[Prototype-core] Re: Cloned repo via git, not seeing the unit test html files

2009-03-20 Thread T.J. Crowder
unittest_js submodules. Let me know how things go. Best, Tobie On Mar 20, 10:39 am, T.J. Crowder t...@crowdersoftware.com wrote: Hi all, I don't seem to be seeing the unit test HTML files.  Apologies if I've done something daft, but I'm running out the door so I thought I'd ping

[Prototype-core] Re: Protopacked version bigger than original?

2009-03-21 Thread T.J. Crowder
Wes, Please use the general Prototype script.aculo.us discussion group[1] for general discussion; this list is for core development discussion only. [1] http://groups.google.com/group/prototype-scriptaculous Thanks, -- T.J. Crowder tj / crowder software / com Independent Software Engineer

[Prototype-core] Re: Cloned repo via git, not seeing the unit test html files

2009-03-21 Thread T.J. Crowder
(Yes, I do have JavaScript allowed to do anything it wants with the window.) * Refuses to test against Safari 3.2.2, says it's not supported on Windows [1] http://prototypejs.org/download FWIW, -- T.J. :-) On Mar 20, 8:59 pm, kangax kan...@gmail.com wrote: On Mar 20, 3:03 pm, T.J. Crowder t

[Prototype-core] Anyone with PDoc working who can test a trivial patch for me?

2009-03-25 Thread T.J. Crowder
Thanks in advance, -- T.J. Crowder tj / crowder software / com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype: Core group. To post to this group, send email to prototype-core@googlegroups.com To unsubscribe

[Prototype-core] Re: Thoughts on Namespacing Native APIs

2009-03-25 Thread T.J. Crowder
://groups.google.com/group/prototype-core/browse_thread/thread/16d0517ecc605a00/c9cfe041c1da19de FWIW, -- T.J. Crowder tj / crowder software / com On Mar 25, 12:32 pm, Robert Kieffer bro...@gmail.com wrote: On Mar 24, 3:32 pm, Tobie Langel tobie.lan...@gmail.com wrote: Unfortunately, a number

[Prototype-core] Re: Function.prototype.defer

2009-03-29 Thread T.J. Crowder
wouldn't want to explain the subtle effects of that to confused users. :-) Again, FWIW, -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Mar 29, 9:05 am, Yaffle vic99...@yandex.ru wrote: Should I use defer method for browsers, which

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

2009-04-02 Thread T.J. Crowder
, T.J. Crowder t...@crowdersoftware.com wrote: Hi Andrew, Thanks for the help.  Yeah, it is weird, isn't it? :-)  And yet we have permission to delete it (apparently, as it does get deleted). Are you logged in as an administrator? I am indeed, and that file is being created in the temp

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

2009-04-02 Thread T.J. Crowder
? I wonder if this has only been used successfully on Windows (if even there?), Mac OS X, and the like that don't (by default) have case-sensitive file systems... -- T.J. On Apr 2, 10:08 am, T.J. Crowder t...@crowdersoftware.com wrote: Folks, Can anyone build the docs other than Tobie and Andrew

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

2009-04-03 Thread T.J. Crowder
from the root Prototype directory. Those sound like issues I had run into, and fixed, several weeks ago. Meanwhile, I'll fire up my Windows VM and see what happens when I try to generate docs from there. Cheers, Andrew On Apr 2, 6:17 am, T.J. Crowder t...@crowdersoftware.com wrote: Hi

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

2009-04-03 Thread T.J. Crowder
on Windows. I also know nothing about Ruby, but I suspect that it does as well. -- T.J. On Apr 3, 1:37 pm, Richard Quadling rquadl...@googlemail.com wrote: 2009/4/3 T.J. Crowder t...@crowdersoftware.com: Hi Andrew, T.J., are you sure you're running the latest code? Yup, for the Ubuntu system

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

2009-04-07 Thread T.J. Crowder
line on the page, I get a 404 for language \dollara.html. Can anyone build the docs without having that problem? I just need to know whether it's an issue with my setup. Thanks, -- T.J. On Apr 3, 10:41 pm, T.J. Crowder t...@crowdersoftware.com wrote: Hi Andrew, Thanks.  With the latest

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

2009-04-08 Thread T.J. Crowder
Hi Richard, For these really long listings and such, I wonder if it might be better to use Pastie[1] rather than inlining them in messages? (Pastie has a plain text choice.) It's just that with replies and quoting and such, these messages get REALLY long and in some cases they seem to freak out

[Prototype-core] Form#serializeElement's 'submit' option, doc could use another pair of eyes

2009-08-21 Thread T.J. Crowder
Hi folks, I fixed ticket #21 today with this commit (my branch, not core): http://github.com/tjcrowder/prototype/commit/47d82530fe3d8751e5c95d528bf324d2fb450666 I'd appreciate it if someone would look hard at the relevant if statement in Form.serializeElements and check that their

[Prototype-core] Re: Form#serializeElement's 'submit' option, doc could use another pair of eyes

2009-08-22 Thread T.J. Crowder
Cheers Allen. -- T.J. :-) On Aug 21, 7:49 pm, Allen Madsen bla...@gmail.com 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 t...@crowdersoftware.comwrote: Hi folks, I fixed ticket #21 today

[Prototype-core] Re: Template Class

2009-08-27 Thread T.J. Crowder
://github.com/tjcrowder/prototype/commit/29b76e7a9e9c6168d62f1d1c6da9aafb1bf5086f FWIW, -- T.J. Crowder tj / crowder software / com On Aug 26, 12:28 am, Samuel Lebeau samuel.leb...@gmail.com wrote: Hi, I've been working on a Template rewrite trying to reduce code size and   complexity. It uses

[Prototype-core] Re: Suggested addition to Function Methods: .repeat(seconds[, arg...])

2009-08-27 Thread T.J. Crowder
trying to make it fit in, and make it as cool as the idea warrants. -- T.J. Crowder tj / crowder software / com On Aug 26, 3:33 am, Samuel Lebeau samuel.leb...@gmail.com wrote: Joe, Callback function receives PE instance as first argument, so here   would be the self-stop mechanism

[Prototype-core] Re: Template Class

2009-08-27 Thread T.J. Crowder
Samuel, Sorry for the Simon error in my last post. Years ago I knew a guy named Simon Lebeau, clearly it got ingrained my brain. -- T.J. :-) On Aug 27, 10:35 am, T.J. Crowder t...@crowdersoftware.com wrote: Hi Simon, Funny you should be doing that, I was just looking at Template the other

[Prototype-core] Re: Strict mode?

2009-08-27 Thread T.J. Crowder
Hi Richard, This may be a topic better discussed in the general discussion group [1]. This group is for Prototype core development discussion. [1] http://groups.google.com/group/prototype-scriptaculous -- T.J. Crowder tj / crowder software / com On Aug 27, 10:12 am, Richard Heyes richard.he

[Prototype-core] Re: rake doc in prototype giving error.

2009-08-27 Thread T.J. Crowder
of timeframe, but we're talking hours or days, not weeks. -- T.J. Crowder tj / crowder software / com On Aug 27, 11:43 am, Richard Quadling rquadl...@googlemail.com wrote: Hi. I've just updated my local copy of prototype from git. All looks OK. Rebuilt prototype.js all fine. Run rake doc

[Prototype-core] Re: change DOM on select option

2009-08-27 Thread T.J. Crowder
Hi, This group is for discussion of development of the Prototype library, not usage of it. Please see this group[1]. [1] http://groups.google.com/group/prototype-scriptaculous -- T.J. Crowder tj / crowder software / com On Aug 27, 1:01 pm, clicforw...@googlemail.com clicforw

[Prototype-core] Re: change DOM on select option

2009-08-27 Thread T.J. Crowder
@Allen, Alexander, Rainer, Again, can we please pick this up over on the appropriate group[1]? [1] http://groups.google.com/group/prototype-scriptaculous Cheers, -- T.J. Crowder tj / crowder software / com On Aug 27, 2:50 pm, Rainer Weber clicforw...@googlemail.com wrote: Hello, thanks

[Prototype-core] Future extensions to the Template class

2009-08-27 Thread T.J. Crowder
Hi all, See this fairly half-baked ticket in Lighthouse for context: https://prototype.lighthouseapp.com/projects/8886/tickets/773 Responding to the proof-of-concept commit, Kangax asked whether * was used for this sort of thing anywhere else, and in a private email Tobie flagged up how this in

[Prototype-core] Re: Suggested addition to Function Methods: .repeat(seconds[, arg...])

2009-08-27 Thread T.J. Crowder
Hey Robert, It's true, I was thinking in terms of deprecating PE at some stage... :-) Re #2: Using #bind at least doubles the call overhead, which I'm not a fan of generally. ...have it throw $break! Now that is a very smart idea. -- T.J. Crowder tj / crowder software / com On Aug 27, 4:13

[Prototype-core] Re: Suggested addition to Function Methods: .repeat(seconds[, arg...])

2009-08-27 Thread T.J. Crowder
Exceptions aren't eaten. Good, so a $break-like mechanism is possible then, just moved out a level. -- T.J. On Aug 27, 10:49 pm, Tobie Langel tobie.lan...@gmail.com wrote: *blech* to ES5's enumerable stuff not having $break or similar functionality.  I've just read the forEach section of

[Prototype-core] Re: More useful Element.clone method

2009-08-28 Thread T.J. Crowder
-scriptaculous/browse_thread/thread/e5286fee9ac18a40 Happy coding, -- T.J. Crowder tj / crowder software / com www.crowdersoftware.com On Aug 27, 5:36 pm, watermark86 watermar...@gmail.com wrote: I posted this code on the support list, but now that it's working, it seems more appropriate to put

[Prototype-core] A more efficient $super for Prototype 2

2009-09-04 Thread T.J. Crowder
I would expect most class authors to use, the benefit is less but still marked. Call overhead isn't sexy, but does anyone else think this is worth looking at more closely? -- T.J. Crowder tj / crowder software / com www.crowdersoftware.com --~--~-~--~~~---~--~~ You

[Prototype-core] Re: A more efficient $super for Prototype 2

2009-09-04 Thread T.J. Crowder
@Allen @Jim, Gets my vote. -- T.J. :-) On Sep 4, 3:05 pm, Jim Higson j...@wikizzle.org wrote: On Friday 04 September 2009 14:09:32 T.J. Crowder wrote: [...] I do _not_ mean that I think callSuper is a great name; I don't and I expect suggestions like yours to result in a better name

[Prototype-core] Copying arguments

2009-09-04 Thread T.J. Crowder
, and that lead to my finding wild differences in a very simple operation (zero-filling an array) across implementations. FWIW, [1] http://stackoverflow.com/questions/1295584/most-efficient-way-to-create-a-zero-filled-javascript-array/1295671 -- T.J. Crowder tj / crowder software / com

[Prototype-core] Re: A more efficient $super for Prototype 2

2009-09-04 Thread T.J. Crowder
of the great things about the new mechanism is that you don't have to copy args at all if you are willing to use the more verbose syntax. [1] http://groups.google.com/group/prototype-core/browse_thread/thread/cf8c287e231a0192# -- T.J. Crowder tj / crowder software / com www.crowdersoftware.com On Sep 4

[Prototype-core] Re: Odd Maruku errors whilst raking the docs.

2009-09-04 Thread T.J. Crowder
Hi Richard, Yeah, see the PDoc mailing list[1]. Maruku is a no-go, too. :- ( Tobie's getting very frustrated (as am I). [1] http://groups.google.com/group/pdoc?lnk= -- T.J. Crowder tj / crowder software / com www.crowdersoftware.com On Sep 4, 4:59 pm, Richard Quadling rquadl

[Prototype-core] Re: A more efficient $super for Prototype 2

2009-09-04 Thread T.J. Crowder
and sharing it 'round; I'll do that over the weekend. -- T.J. Crowder tj / crowder software / com www.crowdersoftware.com On Sep 4, 6:25 pm, kangax kan...@gmail.com wrote: On Sep 4, 8:15 am, T.J. Crowder t...@crowdersoftware.com wrote: Hi all, I've come up with a new way of handling $super

[Prototype-core] Re: A more efficient $super for Prototype 2

2009-09-06 Thread T.J. Crowder
end up endlessly recursing. Wow that's an easy trap to fall into. No, it's either use the function's name unadorned, or use arguments.callee and pay the performance penalty. Personally, I prefer using the function's name. :-) -- T.J. :-) On Sep 6, 8:48 am, T.J. Crowder t...@crowdersoftware.com

[Prototype-core] Re: Copying arguments

2009-09-06 Thread T.J. Crowder
developers). Both of those are things that have not been done enough in the past and have held back progress, hence trying to move move toward them. As a Prototype user, thank you again for your efforts at improving efficiency, greatly appreciated, -- T.J. Crowder tj / crowder software / com

[Prototype-core] Re: Now that 1.6.1 is out and api.prototypejs.org is official...

2009-09-06 Thread T.J. Crowder
://api.prototypejg.org up and running soon. -- T.J. Crowder tj / crowder software / com www.crowdersoftware.com On Sep 6, 9:35 pm, joneff jon...@gmail.com wrote: Is it just me, or the usability of the new API micro site isn't as good as the old one? I mean before, if I wanted to know more about Event

[Prototype-core] Why have the examples been stripped out of the documentation?

2009-09-07 Thread T.J. Crowder
. Why? (Brief) examples are a good thing in documentation! I'm restoring most of them, adjusting some to be a little more clear, but somebody tell me if there's some strong reason for stripping them out. -- T.J. Crowder tj / crowder software / com

[Prototype-core] Re: A more efficient $super for Prototype 2

2009-09-08 Thread T.J. Crowder
Hi Jim, Perhaps I would do: var B = Class.create(A, { nifty: function(){ var $super = this.nifty.$super.bind( this ); // $super refers to A.nifty() bound to this $super(); } }); [1] Please correct if this is wrong! You need to leave out the this. and use a named

[Prototype-core] Re: A more efficient $super for Prototype 2

2009-09-08 Thread T.J. Crowder
Hi, It really looks nicer :) Thanks! I haven't run it but I guest it is possible to do this.method.$super.call(this, ...) No, you need to drop the this. from the beginning of that. See my reply to Allen a couple up (or the PDoc comments here[1]) for why.

[Prototype-core] Re: A more efficient $super for Prototype 2

2009-09-08 Thread T.J. Crowder
Quadling rquadl...@googlemail.com wrote: 2009/9/8 T.J. Crowder t...@crowdersoftware.com: Hi, It really looks nicer :) Thanks! I haven't run it but I guest it is possible to do this.method.$super.call(this, ...) No, you need to drop the this. from the beginning of that.  See my

[Prototype-core] Re: A more efficient $super for Prototype 2

2009-09-08 Thread T.J. Crowder
my stuff into it: git pull tjcrowder supercalls 5. Build rake dist 6. Profit! Alternately, here's[1] a pre-baked copy for anyone who just wants to grab it and play around, but of course it will go stale fairly quickly. [1] http://gist.github.com/182838 -- T.J. On Sep 8, 1:15 pm, T.J

[Prototype-core] Re: Why have the examples been stripped out of the documentation?

2009-09-08 Thread T.J. Crowder
use frequently. Kudos, T.J. -joe t. On Sep 7, 6:54 am, T.J. Crowder t...@crowdersoftware.com wrote: Hi all, As some of you know, I'm running through all of our old docs and merging them into the PDoc comments in the source, and I've run into a really common theme:  Where methods

[Prototype-core] Re: A more efficient $super for Prototype 2

2009-09-08 Thread T.J. Crowder
@Allen, For your two suggested additions. I don't think I have ever had a use for either. Thanks. One thing I would like to suggest though is that Class.create take an object or a function as an argument. I _really_ like that idea, not least because it seems to me that by reducing the

[Prototype-core] Re: A more efficient $super for Prototype 2

2009-09-08 Thread T.J. Crowder
() { ... } function keen() { ... } // Export public methods return {nifty: nifty, spiffy: spiffy, keen: keen}; }); ...while still accepting the form where we've already been given an object. Nice one! -- T.J. Crowder tj / crowder software / com www.crowdersoftware.com

[Prototype-core] Re: A more efficient $super for Prototype 2

2009-09-08 Thread T.J. Crowder
for jumping into this, -- T.J. Crowder tj / crowder software / com www.crowdersoftware.com On Sep 8, 4:11 pm, Robert Kieffer bro...@gmail.com wrote: I still have some serious reservations about this patch. Before I dive into details, though, can someone please tell me why we're not looking at Dean

[Prototype-core] Re: A more efficient $super for Prototype 2

2009-09-08 Thread T.J. Crowder
and bound functions, though, and I'm glad to hear that will be finding its way into 1.6.1. -- T.J. :-) On Sep 8, 7:43 pm, Robert Kieffer bro...@gmail.com wrote: On Sep 8, 8:44 am, T.J. Crowder t...@crowdersoftware.com wrote:             arguments.callee.$super.call(this, arg

[Prototype-core] Re: A more efficient $super for Prototype 2

2009-09-09 Thread T.J. Crowder
Hi all, I thought of a wrinkle today: Mixins. This new mechanism modifies function instances if they override base class functions (it leaves them alone if they don't). So if you mix in something that has a function with the same name as a parent class's function, we will set a $super

[Prototype-core] Re: A more efficient $super for Prototype 2

2009-09-09 Thread T.J. Crowder
Hi Allen, Thanks. I agree, it's a very edgy edge case. :-) (wouldn't the current let you do this as well?) Actually, it works in the current implementation, because if a mixin function uses $super (which again is a bit odd), addMethods wraps it up in a closure and never modifies the actual

[Prototype-core] Re: A more efficient $super for Prototype 2

2009-09-09 Thread T.J. Crowder
Hi Robert, That's a very interesting use case, thanks for that. I can certainly see the utility of that, and in fact as I was writing all of this up for my (pathetic little) blog I was getting increasingly uncomfortable with the mixin issue. If it's important for mixins to participate in

[Prototype-core] Re: Private methods for prototype class

2009-09-10 Thread T.J. Crowder
Hi Ngan, This question is probably more appropriate for the user's group[1], rather than the core development group. If you'll repost over there, there are a couple of things to point out in that stuff... [1] http://groups.google.com/group/prototype-scriptaculous -- T.J. Crowder tj / crowder

[Prototype-core] Re: True Hashes using objects as keys

2009-09-10 Thread T.J. Crowder
it as not worthwhile). I'm not aware of any plans to do so. I suspect you'd be better off (from a performance standpoint) building toString / fromString support into your keys. FWIW, -- T.J. Crowder tj / crowder software / com www.crowdersoftware.com On Sep 10, 7:07 pm, James Aimonetti james.aimone...@gmail.com

[Prototype-core] Re: Possible bug when adding additional element methods in IE8

2009-09-10 Thread T.J. Crowder
). I will just make this function exists in IE6 7, but not 8 for now, unless someone can tell me what exactly is causing this. If someone wants to, I can still attach a simple test for this. On Sep 10, 4:07 pm, T.J. Crowder t...@crowdersoftware.com wrote: Hi Viktor, Could you put

[Prototype-core] Re: True Hashes using objects as keys

2009-09-11 Thread T.J. Crowder
@Samuel: I've been working on this too and had quite reasonable performance I like it, _should_ perform a *lot* better than a straight array given a reasonable distribution of keys. This is similar to what Java's HashMap does (not that I'm holding it up as a model of high performance). @Jim:

  1   2   >