Sorry, i meant:

this.push ( new Array() );

-TH

--- In flexcoders@yahoogroups.com, "Tim Hoff" <timh...@...> wrote:
>
>
> Have you tried something like this:
>
> this.addItem( new Array() );
>
> -TH
>
> --- In flexcoders@yahoogroups.com, "smitade" smitade@ wrote:
> >
> > I'm trying to extend an Array into a 2D matrix. Any suggestions? The
> following code fails but I don't understand why.
> >
> > public class MatRix extends Array
> > {
> > public function MatRix(numRows:int=0,numCols:int=0)
> > {
> > super(numRows);
> > for (var i:int=0;i<numRows;i++)
> > {
> > for (var j:int=0;j<numCols;j++)
> > {
> > this[j]=new Array();
> > }
> > }
> > }
> >
>



Reply via email to