On Jun 9, 2008, at 5:11 PM, Derrick Anderson wrote:
oldfusion, but i don't think it matters- i'm trying to take an
actionscript object (the selectedItem of a datagrid) and cast it to
another actionscript object (my VO). i suspected the
mx_internal_uid property on the list item is messing me up, it's
the only property that comes into the VO from the datagrid that the
VO does not have- so i got to googling.
Ah, I forgot about that issue. VOs in my projects always implement
the IUID interface because of issues with the internal Flex controls
(especially TileList). That's why I didn't see any issue with your
code – in my implementation it works fine to cast it anywhere in the
application from a dataProvider driven control.
Here's an example:
package some.package.path.vo
{
import mx.core.IUID;
[Bindable]
public class MyClass implements IUID
{
private var _uid : String;
public function MyClass()
{
}
public function get uid(): String {
return _uid;
}
public function set uid(value: String): void {
_uid = value;
}
}
}