[Prototype-core] Sprockets quesion

2009-11-23 Thread Jim Higson
Hi, Sorry if this isn't the right place to discuss sprockets. If I want to list dependent files in order, but not concatenate them, is that possible with command line sprocketize? This is so I can set up a project to allow concatenated or non-concatenated js to be used, but still use the

[Prototype-core] Re: Function.EMPTY and Function.K

2009-10-15 Thread Jim Higson
On Thursday 15 October 2009 01:08:53 Andrew Dupont wrote: Weighing in again, decades after starting the thread. First, I'm fine with calling it Function.IDENTITY instead of Function.K. On Sep 25, 2009, at 1:26 AM, T.J. Crowder wrote: Make sense. Shouldn't that be Function.empty and

[Prototype-core] Re: Observing objects

2009-10-08 Thread Jim Higson
n Wednesday 07 October 2009 16:02:28 kangax wrote: On Oct 7, 9:16 am, Jim Higson j...@wikizzle.org wrote: On Wednesday 07 October 2009 13:52:56 Jim Higson wrote: Forked an untested implementation: http://gist.github.com/204008 Ah, just had a better idea and edited again. Does

[Prototype-core] Observing objects

2009-10-07 Thread Jim Higson
In another thread I wrote: The biggest problem with events at the moment is only Elements can fire them. This makes MVC difficult because the Model (javascript objects) not the view (HTML elements) would ideally fire the events. For Prototype2, maybe there should be an observable mixin.

[Prototype-core] Re: Observing objects

2009-10-07 Thread Jim Higson
it into account. Best, Tobie On Oct 7, 9:50 am, Jim Higson j...@wikizzle.org wrote: In another thread I wrote: The biggest problem with events at the moment is only Elements can fire them. This makes MVC difficult because the Model (javascript objects) not the view (HTML elements

[Prototype-core] Re: Observing objects

2009-10-07 Thread Jim Higson
Forked an untested implementation: http://gist.github.com/204008 Jim On Wednesday 07 October 2009 13:41:28 Jim Higson wrote: On Wednesday 07 October 2009 12:34:50 Allen Madsen wrote: Jim, Check this modification of Tobie's code out. http://gist.github.com/203978 The problem you're

[Prototype-core] Re: Observing objects

2009-10-07 Thread Jim Higson
On Wednesday 07 October 2009 13:52:56 Jim Higson wrote: Forked an untested implementation: http://gist.github.com/204008 Ah, just had a better idea and edited again. Does the same but without adding new Elements to the document and without requiring observable object instances to have any

[Prototype-core] Re: Event#element deprecated?

2009-10-06 Thread Jim Higson
On Tuesday 06 October 2009 08:09:21 Tobie Langel wrote: Finally, Sam is working on a new API for event delegation in 1.7 / 2.0. If changes are to be made, they should be discussed once he's posted his initial implementation. If I could suggest... The biggest problem with events at the moment

[Prototype-core] Re: Memory Leak in IE

2009-10-02 Thread Jim Higson
On Thursday 01 October 2009 21:56:30 Mike Rumble wrote: You could also encapsulate this in a function wrapping Element#remove, which IMHO is something Prototype should do out of the box. Quite disagree: * If I remove an element and add it elsewhere, I don't expect its events to have been

[Prototype-core] Re: Function.EMPTY and Function.K

2009-09-29 Thread Jim Higson
On Tuesday 29 September 2009 06:49:15 Joran Greef wrote: Prototype's existing String.empty and Array.empty interfaces would imply that Function.empty return a boolean indicating perhaps that the function is empty. Well, it *could* do: Function.empty = function(){}; Function.empty.empty =

[Prototype-core] Re: Function.EMPTY and Function.K

2009-09-28 Thread Jim Higson
On Saturday 26 September 2009 04:04:22 kangax wrote: On Sep 24, 11:20 pm, Andrew Dupont goo...@andrewdupont.net wrote: Unless anyone has serious objections, or has a better idea, I'm going to add these as aliases of `Prototype.emptyFunction` and `Prototype.K`, respectively. They belong

[Prototype-core] Re: Function.EMPTY and Function.K

2009-09-25 Thread Jim Higson
On Friday 25 September 2009 04:20:06 Andrew Dupont wrote: Unless anyone has serious objections, or has a better idea, I'm going to add these as aliases of `Prototype.emptyFunction` and `Prototype.K`, respectively. They belong better there, since in theory the `Prototype` namespace is for

[Prototype-core] Re: Function.EMPTY and Function.K

2009-09-25 Thread Jim Higson
On Friday 25 September 2009 13:08:57 Rick Waldron wrote: On the subject of end developer confusion, I'd like to make a suggestion regarding the naming... Function.emptyFn Function.returnFn Because they say exactly what they are. This is how I've named (almost... $.function.emptyFn() and

[Prototype-core] Suggestion: selector argument to Element#ancestors

2009-09-21 Thread Jim Higson
A bit like the parameter to Element#up, the selector would define where to stop. Eg: html body div class=content p blah span id=interesting-content not really so interesting /span /p /div /body /html $('interesting-content').ancestors('div#content')

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

2009-09-09 Thread Jim Higson
On Tuesday 08 September 2009 16:18:20 T.J. Crowder wrote: @Jim, Ie, Class.create takes any number of objects of functions or functions. If functions, the function name is used. I see where you're coming from, but FWIW I'm with Allen on this one. Also, there's no standard way to get the

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

2009-09-09 Thread Jim Higson
On Wednesday 09 September 2009 09:02:28 Jim Higson wrote: I see where you're coming from, but FWIW I'm with Allen on this one. Also, there's no standard way to get the name of a function until ECMAScript5 (which standardizes the truly outrageous idea that function instances should have

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

2009-09-08 Thread Jim Higson
On Tuesday 08 September 2009 03:57:13 Allen Madsen wrote: TJ, I guess I don't understand why it wouldn't work. I'll illustrate how I understand it and you correct me where I'm wrong. var A = Class.create({ nifty: function(){} }); var B = Class.create(A, { nifty: function(){

[Prototype-core] Re: String.toObject and Object.toString

2009-09-08 Thread Jim Higson
On Tuesday 08 September 2009 13:56:14 Joran wrote: Dear Tobie Thank you for your reply. Could I suggest a few more questions? 1. Does EcmaScript 5 preclude one from modifying Object.prototype.toString? 2. Over-writing Object.prototype.toString does not at first glance appear to cause it

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

2009-09-08 Thread Jim Higson
On Tuesday 08 September 2009 15:27:49 Allen Madsen wrote: Jim, I like your suggestion, except that there would be no way to create private variables and functions that could be used in more than one function. For example, with my suggested method I could do: I suppose if you wanted both you

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

2009-09-08 Thread Jim Higson
On Tuesday 08 September 2009 14:56:06 Allen Madsen wrote: Hey TJ, For your two suggested additions. I don't think I have ever had a use for either. One thing I would like to suggest though is that Class.create take an object or a function as an argument. Since it is essentially a requirement

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

2009-09-04 Thread Jim Higson
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. But something unlikely to clash makes it simpler for people to do a global search-and-replace to

[Prototype-core] Re: IE6: This page contains both secure and nonsecure items.

2009-07-01 Thread Jim Higson
On Tuesday 30 June 2009 17:41:11 YaoXing Zhang wrote: Diodeus, Maybe you would like to try YUI Compressor which will reduce the size even more. I'm using prototype 1.6.2 and after compressing it becomes from 127Kb to 74Kb. And then you can gzip it... reduces by (IIRC) 50%-ish again. I