RE: [Rails-spinoffs] Re: new classes

2005-12-15 Thread Maninder, Singh
The zip file only contains the .js file.   Would it be possible for you to send an example of how to use the class as well? -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of NicolasSent: Thursday, December 15, 2005 1:44 AMTo: rails-spinoffs

Re: [Rails-spinoffs] extending prototype's classes

2005-12-15 Thread Jeremy Kitchen
On Thursday 15 December 2005 17:56, Andrew Kaspick wrote: > The prototype lib already has the enable and disable functions for the > Form class to do what you want. hmm... you're right :) well, let's say hypothetically I want to extend one of prototype's classes with a function, how would I go a

Re: [Rails-spinoffs] extending prototype's classes

2005-12-15 Thread Andrew Kaspick
The prototype lib already has the enable and disable functions for the Form class to do what you want. On 12/15/05, Jeremy Kitchen <[EMAIL PROTECTED]> wrote: > Hi, I'm relatively new to javascript programming, and OOP in general, so > please be nice to me ;) > > My question is: > I'd like to exten

[Rails-spinoffs] extending prototype's classes

2005-12-15 Thread Jeremy Kitchen
Hi, I'm relatively new to javascript programming, and OOP in general, so please be nice to me ;) My question is: I'd like to extend the Form class in prototype to have a Disable function that will disable all of the fields in a form. I've already written a function to do this, but I'd like to i

Re: [Rails-spinoffs] Generic Question about the way code is written

2005-12-15 Thread Bill Guindon
On 12/15/05, Maninder, Singh <[EMAIL PROTECTED]> wrote: > I won't touch it :) but I can call the method - right? > > Or is it used for some internal calculations? You certainly can call it, but you probably shouldn't. The '_' is used in many languages to imply privacy where privacy can't be enfor

Re: [Rails-spinoffs] [ANN] Prototype Enumerable, Array and Hash Documentation

2005-12-15 Thread Nicolas Terray
On 12/15/05, Maninder, Singh <[EMAIL PROTECTED]> wrote: > That works Nicolos! Thanks. > > But, I was wondering that such support is already built in javascript. > > Why did we have to wrap it in $H for this? > I use $H() only when I want to iterate over keys or value. Example var options = {} opti

RE: [Rails-spinoffs] [ANN] Prototype Enumerable, Array and Hash Documentation

2005-12-15 Thread Maninder, Singh
And so does - h.name h.email h.msg :) -Original Message- From: Maninder, Singh Sent: Thursday, December 15, 2005 5:31 PM To: 'rails-spinoffs@lists.rubyonrails.org' Subject: RE: [Rails-spinoffs] [ANN] Prototype Enumerable,Array and Hash Documentation That works Nicolos! Thanks. But, I

RE: [Rails-spinoffs] [ANN] Prototype Enumerable, Array and Hash Documentation

2005-12-15 Thread Maninder, Singh
That works Nicolos! Thanks. But, I was wondering that such support is already built in javascript. Why did we have to wrap it in $H for this? Thanks, Mandy. ___ Rails-spinoffs mailing list Rails-spinoffs@lists.rubyonrails.org http://lists.rubyonrails.o

Re: [Rails-spinoffs] [ANN] Prototype Enumerable, Array and Hash Documentation

2005-12-15 Thread Nicolas Terray
On 12/15/05, Maninder, Singh <[EMAIL PROTECTED]> wrote: > Suppose I have a hash - > var h = $H({name: "john doe", email: "[EMAIL PROTECTED]", msg: "say hello to > me"}); > > h.keys(); //gives me name/email/msg > h.values() //gives me john doe/[EMAIL PROTECTED]/say hello... > > What if I want to kn

RE: [Rails-spinoffs] Generic Question about the way code is written

2005-12-15 Thread Maninder, Singh
I won't touch it :) but I can call the method - right? Or is it used for some internal calculations? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Abdur-Rahman Advany Sent: Thursday, December 15, 2005 5:13 PM To: rails-spinoffs@lists.rubyonrails.org Subjec

Re: [Rails-spinoffs] Generic Question about the way code is written

2005-12-15 Thread Abdur-Rahman Advany
Javascript does not have private functions, _ means its a private function, don't tuch it ;) Maninder, Singh wrote: Hi, This is a generic question about the way code is written in prototype and scriptaculous libraries. Inside every object, we find functions that begin with "_". How are the

[Rails-spinoffs] Generic Question about the way code is written

2005-12-15 Thread Maninder, Singh
Hi, This is a generic question about the way code is written in prototype and scriptaculous libraries. Inside every object, we find functions that begin with "_". How are these methods/functions different from the rest? eg _text, _attributes, _each... Please let me know. Thank you, Mandy. __

RE: [Rails-spinoffs] [ANN] Prototype Enumerable, Array and Hash Documentation

2005-12-15 Thread Maninder, Singh
Hi Justin, Thomas, Thanks for the documentation. I have one question though - how do I extract the value of any particular key directly? For eg: Suppose I have a hash - var h = $H({name: "john doe", email: "[EMAIL PROTECTED]", msg: "say hello to me"}); h.keys(); //gives me name/email/msg h.v

Re: [Rails-spinoffs] Some handy methods - perhaps cool enough to be committed some time

2005-12-15 Thread Chris Korhonen
Looks good, can already picture a few places where those would come in extremely handy, I can  also see a nice extension of document.getElementsWithInArea document.getElementsWithinVisibleArea... ___ Rails-spinoffs mailing list Rails-spinoffs@lists.ru

[Rails-spinoffs] Some handy methods - perhaps cool enough to be committed some time

2005-12-15 Thread Michael Krog
Hi. Some time ago I posted some prototype-"extensions", which could come in handy. I've been updating them a bit and added a few more and I think its time to share it again. Feel free to use it. The code should be rather self explaining, but heres a quickguide. - new Geometry.Size(width,heig