Skip to main content
Participating Frequently
Jul 12, 2010 4:16 PM UTC
Question

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

This topic is closed to new replies. Start a new post to keep the conversation going.

1 reply

EricJ32Author
Participating Frequently
Jul 13, 2010 10:15 AM UTC

OK, sorted this. It works absolutely fine as is. It was just a caching issue with my remoting-config.xml file.

Sigh.

Translate