Servoy 6 Array Problem

Hi All,

I’m trying to convert my current solution to servoy 6.
My code is as followed, the on_action is of a button on a form:

/**
 * @properties={typeid:35,uuid:"416806F7-2E66-4599-A3AB-2E5453438994",variableType:-4}
 */
var testArray = null;

/**
 * Perform the element default action.
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"11AFE23C-EEBA-43E8-ABAF-8DCD205C0F74"}
 */
function onAction(event) 
{	
	testArray = new Array();
	
	testArray[-999999] = "hello";
	testArray[1] = "Hello to you";
	
	// ex 1) Execute simple Client-Side Javascript (Web-Client only)
	var jsToExecute = "alert('"+testArray[-999999]+"');";
	plugins.WebClientUtils.executeClientSideJS(jsToExecute);
	
	// ex 1) Execute simple Client-Side Javascript (Web-Client only)
	var jsToExecute = "alert('"+testArray[1]+"');";
	plugins.WebClientUtils.executeClientSideJS(jsToExecute);
}

The first time i click the button, the code works.
The second time i click the button, it breaks on ‘testArray = new Array();’ with the following error:

-999999
Wrapped java.lang.ArrayIndexOutOfBoundsException: -999999 (C:\Servoy_Workspaces_6\TestSol\forms\test.js#17)
	at C:\Servoy_Workspaces_6\TestSol\forms\test.js:17 (onAction)

I don’t understand why?
What do I have to change to get this working in servoy 6?

the change you currently have to do is not to use a negative index.

Can you make a case for this with that sample code in our support system?
So that we can fix this problem with an javascript array with negative indexes?

i did find a solution for this, will be fixed for the next 6.0.x release

thanks,

so i don’t have to make a case?

No need for that now, already checked in a fix