:: Forum >>

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
Tuesday, January 24, 2006
:-(((

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)
Tuesday, January 24, 2006
Fixed in RC1.
Alex (ActiveWidgets)
Thursday, February 2, 2006
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.
Thursday, February 2, 2006

This topic is archived.


Back to support forum

Forum search