Hey when I have an "Object" instance that doens't belong to any other class, how can I cast this to a class instance?
Example
A simple User class
public class User
{
public var name:String;
}
When I try to cast
var obj:Object = new Object;
obj.name = "Alex";
var user:User = User(obj);
Flex gives me this error:
TypeError: Error #1034: Type Coercion failed: cannot convert Object@97a52b1 to models.User.