[Prototype-core] Re: [sprockets-rails] Splitting up files for development

2009-02-23 Thread Sam Stephenson
Hi Jonas- On Feb 22, 2009, at 4:26 AM, Jonas Schneider wrote: I want to use sprockets in my rails app (the includes are just so beautiful). Everything is working fine, but the files are always concatenated, even in development. This sucks a bit for debugging; is there an option to just output

[Prototype-core] Re: Trying to rake dist on windows.

2009-02-15 Thread Sam Stephenson
This should be fixed in 6fb6308. -sam On Feb 11, 2009, at 6:01 AM, Richard Quadling wrote: Hi. I think there is a problem using in the Sprockets Environment class. The absolute() method is checking for / -- - Richard Quadling Zend Certified Engineer :

[Prototype-core] Re: Enumerable Map() oddity.

2007-12-04 Thread Sam Stephenson
Hi John- On Dec 4, 2007, at 10:23 AM, John-David Dalton wrote: $$('[type=radio]').map(function(el){return el.next()}); // = [label, label] $$('[type=radio]').map(Element.next); // = [label, undefined] You can use Enumerable#invoke instead of map: $$([type=radio]).invoke(next) // = [label,

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

2007-11-25 Thread Sam Stephenson
On Nov 24, 2007, at 11:32 AM, Viktor Kojouharov wrote: I've submitted a patch to trac for your consideration, which adds array slices a' la Ruby http://dev.rubyonrails.org/ticket/10268 Array objects in JavaScript already have a method called slice:

[Prototype-core] Custom events are now namespaced; contentloaded is now dom:loaded

2007-10-11 Thread Sam Stephenson
A small but important change was made to custom events in [7835] (http://dev.rubyonrails.org/changeset/7835 ): all custom event names must now include a namespace. This is our solution to the problem of custom event names conflicting with non- standard native DOM events, such as mousewheel

[Prototype-core] Re: Error/counter-intuitive Class-inheritance?

2007-08-20 Thread Sam Stephenson
On Aug 20, 2007, at 11:51 AM, Mislav Marohnić wrote: You've been bitten by the fact the array is copied by reference, not by value. You should be setting the initial value for instance variables in the constructor: http://pastie.caboo.se/89338 I'm not sure if this is something we should

[Prototype-core] Re: Some questions concerning new event code

2007-08-09 Thread Sam Stephenson
On Aug 9, 2007, at 5:56 PM, Severin Heiniger wrote: Is there any reason not to remove the event handler(s) from the private event cache when calling Event.stopObserving? The cache may get messed up with dead handlers by and by especially when running as a single page app. And - less

[Prototype-core] Re: RegExp#escape

2007-07-24 Thread Sam Stephenson
Hi Ken- On Jul 24, 2007, at 11:43 AM, Ken Snyder wrote: Just wanted to suggest a static method of the RegExp object as a possible addition to core. RegExp.escape = function(str) { return str.replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1'); }; Good idea. Ruby has this, too, and I've

[Prototype-core] Re: Syntax question

2007-07-05 Thread Sam Stephenson
On Jul 4, 2007, at 10:23 PM, Andrew Dupont wrote: 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.

[Prototype-core] Re: Ajax.Request with method different from GET or POST

2007-03-20 Thread Sam Stephenson
Hi Thomas- On Mar 20, 2:23 pm, Thomas Broyer [EMAIL PROTECTED] wrote: Hi, I was about to use Prototype for its Ajax.Request facilities but soon noticed that the method has to be GET or POST, otherwise it is converted to a POST (as a new entry in the params Hash). What if I want to issue a

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

2007-02-18 Thread Sam Stephenson
On Feb 18, 2:24 pm, Marius Feraru [EMAIL PROTECTED] wrote: Nicely said, with one possible amendment: compactness as in code size? I'd give that the lowest priority, execution speed IMHO is far more important than download speed. After all, we're talking about web applications, not web pages