Skip to main content
Participating Frequently
July 12, 2010
Question

Using [RemoteClass] with an extended class

  • July 12, 2010
  • 1 reply
  • 712 views

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 has been closed for replies.

1 reply

EricJ32Author
Participating Frequently
July 13, 2010

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

Sigh.