3.2.0

Grid.Controllers.Navigation calling concat() with no parameters?

In AW.Grid.Controllers.Navigation (this is in version 2.0.1), what does the call to concat() with no parameters do?

AW.Grid.Controllers.Navigation=(
function()
{
    var c1=[],r1=[];
    function sync1()
    {
        c1=this.getSelectedColumns().concat();
        ...


From what I know of the concat function, you have to pass in a second array to concatenate to the first, so if you're passing in null, what does that do? The reason I ask is because I'm getting a "Unexpected call to method or property access" error because of it in certain random scenarios, and the only way I can fix it is by throwing it in a try/catch block like:

try
{
    c1=this.getSelectedColumns().concat();
}
catch(e)
{
    c1=c1.concat(getSelectedColumns());
}


Any ideas?
Steve
March 10,
The concat() method without arguments creates a copy of the array object.

Is it possible to reproduce this error?
Alex (ActiveWidgets)
March 11,
I only encountered the error in a specific scenario on our one customer's site, the issue arose on only one of the datagrids on our page, and happened after an "AJAX" file upload was performed (submitting the page form to a hidden iframe) and possibly while the iframe was updating the main page with any changes. The other datagrids weren't affected, and it was a bit of an odd chain of events with the function calls being made from all over the place, making it difficult to debug, so I can't really say what the issue could have been.

In regards to the concat() method creating a copy, how does that differ from concatenating the existing array to a blank array? Is it just performance enhancement, or is there a specific reason for it?
Steve
March 31,
how to create combo autocomplete ?? thx
marwin
April 5,

This topic is archived.

See also:


Back to support forum