I have a list base component (a TileList) loaded by creating
objects out of a web service response. Now, let's say I have
another web service that periodically refresh the "selected item".
In the response handler of both the services, raw dynamic
objects are converted to strongly typed actionscript classes which
implements the UID interface. I'd like to use setSelectedItem
method on the list to refresh the selected one, but it doesn't
work. Reading the sources, I saw that it performs a standard
equality check (== operator), which means that the very same
instance of an object must be passed in, in order for the
comparison to match.
The result of this is that I must cycle the entire items
collection, perform the comparison by hand, then pass in the
matching instance. I think this is a waste of time and code,
because internally the same cycle will be repeated again.. doesn't
the UID interface exist to avoid this kind of things? Am I missing