Sébastien,
Good to know. I've already implemented with arrays and it seems to be
enough by now, but thanks for the clarification because I'll probably
need dictionaries in the future.
Questions:
  1. how add/remove behave in a Hash object? I mean, one should send
to add/remove pairs in it right?
  2. I'm about to execute the code I'm developing now for first time
and I expecting that Hash stores any object in the value but I also
wanted to know if Hash keys can be any object or they should be
strings and numbers only?
Thanks,
Sebastian

On May 28, 1:48 pm, Sébastien Gruhier <[EMAIL PROTECTED]> wrote:
> Wrong Hash is an Enumarable too
>
> line 815 Object.extend(Hash.prototype, Enumerable);
>
> Seb
>
> On May 28, 2007, at 6:31 PM, Sebastian Sastre wrote:
>
>
>
> > Ah! thanks Giuan, I though JS arrays can't grow. In fact a Dictionary
> > is more what I was looking for and Hash seems to have the intention to
> > be a Dictionary (at least in structure) but I've saw that it has a
> > lack of #select, #detect, etc methods so I'm reconsidering using a
> > Hash and try the Array as you said. In a quick view of Prototype code
> > I saw that Hash don't even seems to be a class so I'm a little
> > confused about that. Anyway.. I will try with anArray because
> > Enumerator provides it of a pretty decent behavior.
>
> > thanks a lot,
>
> > Sebastian
>
> > On May 27, 6:48 pm, giuan <[EMAIL PROTECTED]> wrote:
> >> On May 27, 2:48 am, Sebastian Sastre <[EMAIL PROTECTED]> wrote:
>
> >>> Hello everyone,
>
> >>>   as you may already noticed from the subject of this post I'm
> >>> new to
> >>> javascript and to be honest if I can choose I'll certainly don't
> >>> do it
> >>> but once javascript is the only way to make web browsers to behave,
> >>> well one had to get dirty on it.
>
> >>>   Said that, I found Prototype (and Scriptaculous) very nice
> >>> frameworks. They have a lot of sense and add a lot of value to
> >>> the web
> >>> developing experience. So I glad you have made this and I can
> >>> participate in this group.
>
> >> In javascript you can use Array and the method push that add to the
> >> end, pop that remove from the end, shift that return and remove the
> >> first. Prototype extends Array with Enumerable. You have a lot of
> >> methods there!
>
> >> Giuan


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to