3.0 beta 2

Changes to Array prototype causing problems with grid

I've having a couple of problems using the grid after defining a couple of prototype methods for the Array object. One such method is shown below. Unfortunately these methods are required and so cannot simply be removed.

Any suggestions??
Thanks in advance

Array.prototype.remove = function( index )
{
    if ( ( index >= 0 ) && ( index < this.length ) )
    {
        delete this[index];
        
        for ( var i = index; i < ( this.length - 1 ); i++ )
        {
            this[i] = this[i + 1]; 
        }
        
        this.length--;
    }
}
Helen Williamson
January 24,
:-(((

I found one place where this code breaks the grid and I will correct this in the next release (RC1).

If you are using js array and obj.setCellText(myData) - there could be a workaround - obj.setCellText(function(c,r){return myData[r][c]});
Alex (ActiveWidgets)
January 24,
Fixed in RC1.
Alex (ActiveWidgets)
February 2,
Alex,

Thanks for using c for 'column' and r for 'row' This is much clearer than i and j, and would be good to use everywhere (code and documentation). The switch between 1.0 and 2.0 in the order of column and row in the api caught me, and it took some fiddling to figure out why.
Jim D.
February 2,

This topic is archived.

See also:


Back to support forum

Search

Version 2

Looking for AW 2.6 ?
The old site is here.