Hello, I''ve created a TextMate bundle for Prototype & Scriptaculus. It''s an early version but I thought I share it anyway. Please send me any comments. http://burnfield.com/martin/2006/07/14/textmate-prototype-scriptaculus-bundle Ciao Martin pluxemburg.com burnfield.com/martin
Great, lots of snippets and stuff. One issue I have though is, why " instead of '' all the time. Like $("id") rather than $(''id'') which seems to be the way strings are handled in prototype and scriptaculous both. I think this should be changed, other than that it seems great at a first glance and I can''t wait for it to make my workday better :) Andreas On Jul 14, 2006, at 21:59 , Martin Ström wrote:> Hello, > > I''ve created a TextMate bundle for Prototype & Scriptaculus. It''s an > early version but I thought I share it anyway. Please send me any > comments. > > http://burnfield.com/martin/2006/07/14/textmate-prototype- > scriptaculus-bundle > > Ciao > Martin > > pluxemburg.com > burnfield.com/martin > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Actuall I''m just used to use double quotes instead. Since no quotes are parsed in JavaScript there aren''t any difference. I can change the quotes to single if this is the preferred Prototype way? On 7/15/06, Andreas Wahlin <andreaswahlin-cgr7CL/LOSDk1uMJSBkQmQ@public.gmane.org> wrote:> Great, lots of snippets and stuff. One issue I have though is, why " > instead of '' all the time. > Like $("id") rather than $(''id'') which seems to be the way strings > are handled in prototype and scriptaculous both. > I think this should be changed, other than that it seems great at a > first glance and I can''t wait for it to make my workday better :) > > Andreas > > > On Jul 14, 2006, at 21:59 , Martin Ström wrote: > > > Hello, > > > > I''ve created a TextMate bundle for Prototype & Scriptaculus. It''s an > > early version but I thought I share it anyway. Please send me any > > comments. > > > > http://burnfield.com/martin/2006/07/14/textmate-prototype- > > scriptaculus-bundle > > > > Ciao > > Martin > > > > pluxemburg.com > > burnfield.com/martin > > _______________________________________________ > > Rails-spinoffs mailing list > > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >
On 7/15/06, Martin Ström <martinstromlists-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Actuall I''m just used to use double quotes instead. Since no quotes > are parsed in JavaScript there aren''t any difference. I can change the > quotes to single if this is the preferred Prototype way?Using '' versus " in JavaScript is largely a style preference. I tend to use " in HTML and '' in JavaScript, Perl, Oracle, etc.. While there might be some value in being consistant with Prototype/script.aculo.us, especially the examples available on the wiki and the documentation that others have put together, it''s your call. I''m a big fan of consistancy. What, exactly, do you mean by "Since no quotes are parsed in JavaScript there aren''t any difference."? There may be places where JavaScript auto-quotes (such as when defining keys in an Object), but to the best of my knowledge, JavaScript is definitely aware of and sensitive to quotes. Todd P.S. I''m interpreting the term "quotes" to mean both single and double.
> While there might be some value in being consistant with > Prototype/script.aculo.us, especially the examples available on the > wiki and the documentation that others have put together, it''s your > call. I''m a big fan of consistancy.I''ll convert to single quotes in the bundle asap as this seems to be the standard> > What, exactly, do you mean by "Since no quotes are parsed in > JavaScript there aren''t any difference."? There may be places whereIn Ruby (for example) strings are parsed in difference ways depending on the quote type. Single quotes will not be interpreted but double quotes will. Look here: ''today is #{Time.now}'' => "today is \#{Time.now}" "today is #{Time.now}" => "today is Sat Jul 15 14:59:23 CEST 2006"> JavaScript auto-quotes (such as when defining keys in an Object), but > to the best of my knowledge, JavaScript is definitely aware of and > sensitive to quotes. > > Todd > > P.S. I''m interpreting the term "quotes" to mean both single and double. > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >
Using double-quotes seems to be the accepted HTML standard, so using single quotes in JavaScript more easily allows for things like: $(''blah'').update(''<a href="xyz">huhu</a>'') So, it can help minimize the effort for escaping strings (and therefore possibly having less bugs and also less lost time). :) -Thomas Am 15.07.2006 um 14:57 schrieb Martin Ström:>> > I''ll convert to single quotes in the bundle asap as this seems to be > the standard > >> >> What, exactly, do you mean by "Since no quotes are parsed in >> JavaScript there aren''t any difference."? There may be places where