plugins.dialogs.showSelectDialog & arrays

I have a line of code like:

var answer = plugins.dialogs.showSelectDialog(‘Attention…’, ‘Question?’, myArray);

As you understand, myArray is an array and a correct one (I have checked that). But, when I use this the listbox is filled with java messages like:

org.mozilla.javascript.NativejavaObject@b9b26a etc.

Is this me doing something wrong or is this a bug?

I really need to fill it with an array since I don’t know on forehand what to fill the combobox of this dialog with…

Does this code work?

var myArray = new Array(‘one’,‘two’,‘three’);
var answer = plugins.dialogs.showSelectDialog(‘Attention…’, ‘Question?’, myArray);

Can you post me an example how you make youre array?

Yes, maarten your code works.

Strange because I have checked the result of the below code and that is ok…

But ok here is the code:

var query = ‘SELECT * FROM table WHERE field = 1 ORDER BY field1’;
var dataset = databaseManager.getDataSetByQuery(controller.getServerName(), query, null, 100);
var myArray = new Array(dataset.getMaxRowIndex());

for ( var i = 0 ; i < dataset.getMaxRowIndex() ; i++ )
{myArray = dataset.getValue(i + 1, 1);}
var answer = plugins.dialogs.showSelectDialog(‘Attention’, ‘Question’, myArray);

What type should dataset.getValue(i + 1, 1) return?
String? (then it will be fixed in the next beta (b6)
But i will look into it a bit further.. Because it seems that javascript array’s are not always converted to java arrays .

fixed it. (next beta: b6)

Thanks Johan…