// sets and returns the index in a combo box for a selected field and value // if value is not found, the data object will be pushed into the combo box private function setComboBoxIndex(cb:ComboBox, field:String, value:*, data:*):int{ var result:int = -1; if (value > -1){ var idx:int = 0; for (idx=0; idx