[Javascript] custom extension of Array object

Flavio Gomes flavio at economisa.com.br
Thu Apr 14 08:00:33 CDT 2005


James/Jenni ( =p )

  Could you be a litte bit more especific?
   What you want would be to something like this to work?

 ===========
  var myObj    = new JamesArray();
  var size     = myObj.length();
  var jamesVar = myObj.jamesFunction();
 ===========

--
Flavio Gomes
flavio at economisa.com.br


james wrote:

> Hi
>
> My second question of the night. :-)
>
> ok.. what I am wanting to do it this, I want to create a custom object 
> which inherits all the methods of the Array object, but I don't want 
> to alter the normal Array objects.
>
> does this make sense?, the way I see it is that I make my custom 
> object a 'subclass' of the Array object.
>
> I can't figure out how to do it and i keep getting errors.
>
> I would gratefully receive any advice, even if it was to tell me what 
> I am trying to do is stupid!
>
> Thanks
>
> James




More information about the Javascript mailing list