My idea is to create a new object that extends the Array object...
I have read that link already, and, yes, probably I am a bit confused....
could you help to shade some light?


On Fri, Jun 4, 2010 at 11:58, Lemmi <l...@vipixel.de> wrote:

> What do you want to do with your code? I don't understand it? I think
> you misunderstand the idea of Prototypes $super argument in a class.
> Look to the following: http://prototypejs.org/learn/class-inheritance
>
> Which version of prototype do you?
>
> On 4 Jun., 08:43, 0m4r <omar.adob...@gmail.com> wrote:
> > I did click report as spam by mistake, please don't mark this as
> > spam! :)
> >
> > On Jun 3, 6:07 pm, 0m4r <omar.adob...@gmail.com> wrote:
> >
> > > I am trying to get this code to work, but, no luck till now:
> > > ==
> > > var myArray = Class.create(Array, {
> >
> > >  initialize: function($super, obj){
> > >    for(var i=0; i<obj.length; i++){
> > >      var tmp = obj[i];
> >
> > >        //do stuff to tmp
> >
> > >      $super.push(tmp);
> > >  }
> >
> > > }
> >
> > > ==
> >
> > > this is the error:
> >
> > > ==
> > > parent.subclasses is undefined
> > >  parent.subclasses.push(klass);
> > > ==
> >
> > > can anybody help me?
> >
> > > Thanks,
> >
> > > Omar
>
> --
> You received this message because you are subscribed to the Google Groups
> "Prototype & script.aculo.us" group.
> To post to this group, send email to
> prototype-scriptacul...@googlegroups.com.
> To unsubscribe from this group, send email to
> prototype-scriptaculous+unsubscr...@googlegroups.com<prototype-scriptaculous%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/prototype-scriptaculous?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to