Find Index on ArrayCollection for ComboBox Selection


/ Published in: ActionScript 3
Save to your folder(s)

Used to retriev a index, for example to select a item on a combobox with the arrayCollection as dataProvider.

Usage:
comboBoxNames.selectedIndex = findIndex(arrayColNames, "field_on_array_collection", "value_to_compare_with_field_in_array_coll");

Returns the arrayCollection index that corresponds to compared item. If item is not found on arrayCollection it return -1.

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.