View Single Post
Old 06-08-2012, 09:54 AM   PM User | #4
Student1989
New to the CF scene

 
Join Date: May 2012
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Student1989 is an unknown quantity at this point
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.
Student1989 is offline   Reply With Quote