|
I found the problem.
I’ve tried to loop through the array of names before. It got me thinking. It had to work, but it didn’t.
for (i = 0; i < this.dataprovider.length ; i++){
if(this.dataprovider.getItemAt(i).name == name ){
combo.selectedIndex = i;
break;
}
}
I found out that when I looped throught the data, the method that opened the item wasn't used anymore. In the combobox I used change to call the method.
When I use caretChange instead of change, the method is used.
So when I open the file with the itemname, the itemname is loaded in the combobox and the item is opened on the screen.
|