Setting and getting a drop down list selection
Hi,
This is a general ES question, but since I'm working with FM, I'll try here first.
I am able to create dropdown lists with ES and set/get the current selection, but I'm not clear on why it is working the way it does. It seems that when I set the selection, it uses an index of the current items, but when I get the selection, it gets the actual value.
Consider this sample, with its comments:
//create the dropdown, for the dlg dialog
dlg.dropDown = dlg.add("dropdownlist", undefined, [10, 20, 30]);
//this sets the current value in the box to 30
dlg.dropDown.selection = 2;
//however, this reports 30, not 2
alert(dlg.dropDown.selection);
Does anybody know about this? Is it true that it is an index when set, and a value when gotten? I couldn't find anything in the documentation about it.
Thanks,
Russ
