I'm using a multi-selection list control in MX. I can get a simple list of the selected items but when I try to determine how many items are selected, I get a void return value.
Here's the code I'm using:
selectedItems = sprite(19).selectedItems
selectedCount = selectedItems.count
After the first call returns, selectedItems contains an array of two objects. Each object contains two field ( data and label ). The count call always returns void. I've tried selectedItems.count() which indicates that two parameters are required and every other permutation I can think of.
What's the secret to counting the number of items in a list?
Your problem is perhaps that the object returned is an AS object and not a (Lingo) list. What happens if you try
selectedCount = selectedItems.length
Thanks, Sean. This solved my problem. You are a life saver!