Multicolumn issue, getting unexpected exceptions

Hi folks,

I came across a column issue I already reported (I guess). Took the time for a little demo now.

Preparations:
Add both multicol columns to the file display. Hit "Refresh", the function for the multicol columns is called and values for both multicol columns will be provided on each call. No exceptions should be visible in the console (although things go wrong already).

Now let's break it:
Comment out the "return" statement in the lower function for the multi columns.

There is another unexpected call to the multi column function, although all values have been provided the first time. Luckily the data.columns collection seems to be faulty the second time, so we get the exception and get to know that there is something wrong. The function will throw an "index out of bounds"-like exception when called the second time.

Thank you, tb.

///////////////////////////////////////////////////////////////////////////////
function OnInit(data){
    data.name = "Misc.Column: MultiCol_vs_SingleCol-Issue";
    data.desc = "";
	data.default_enable = true;

	var cmd = data.AddColumn();
    cmd.name = "Single";
    cmd.method = "Column_Single";
	cmd.autogroup = false;

	var cmd = data.AddColumn();
    cmd.name = "Multi";
    cmd.method = "Column_Multi";
	cmd.multicol = true;
	cmd.autogroup = false;

	var cmd = data.AddColumn();
    cmd.name = "Multi2";
    cmd.method = "Column_Multi";
	cmd.multicol = true;
	cmd.autogroup = false;
}
///////////////////////////////////////////////////////////////////////////////
function Column_Single(data){
	DOpus.Output("Column_Single() for " + data.col);
	DOpus.Delay(200);
	data.value = "single value";
	DOpus.Output("Column_Single() --- END");
}
///////////////////////////////////////////////////////////////////////////////
function Column_Multi(data){
	DOpus.Output("Column_Multi()  for " + data.col);
	if (data.col == "Multi2"){
		//comment-out the return to get "index out of bounds" exception
		return;
	}
	data.columns("Multi2").value = "multi value2";
	data.columns("Multi").value = "multi value";
	DOpus.Output("Column_Multi() --- END");
}

Thanks, will be fixed in the next update!

Thanks, it seems you nailed it! o)
This puts the scripted columns feature back to work.
It really was about time! o)

The initial post about this can be found here: