Using [RemoteClass] with an extended class
Hi,
I'm using Cairngorm 3 with Parsley to build a new application. I am connecting to a .NET backend through Weborb.
I have an event which fetches a list of objects of class PlanVO from my .NET library. This is mapped to a class in my Flex project, called Plan. When I fetch the objects and populate an ArrayCollection, they are automatically created as Plan objects.
[Bindable]
[RemoteClass(alias="test.PlanVO")]
public class Plan
{
[SyncId]
public var id:int;
public var name:String;
}
That's great, but now I want to do the same with a class that extends another (the classes are identical in the .NET library)
[Bindable]
[RemoteClass(alias="test.AnimalVO")]
public class Animal
{
[SyncId]
public var id:int;
public var name:String;
}
[Bindable]
[RemoteClass(alias="test.DogVO")]
public class Dog extends Animal
{
public var breed:String;
}
Now, when I return an array of DogVO objects from the .NET library, the ArrayCollection that is populated is of type Object, where I'd like it to be of type Dog.
Could anyone point me in the right direction?
Thanks
