Results 1 to 2 of 2

Thread: inheritance in Actionscript

  1. #1

    Default inheritance in Actionscript

    hi guys
    Using flex in UI and java in my backend.My remote object java class structure is like this

    Public class PersonDetail extends Person
    {
    String jailcode;
    String jailtime;
    set();
    get();
    }

    Public class Person extends Base
    {
    string personrace;
    string personage;
    String email;
    set();
    get();
    }

    Public class Base{
    String id;
    String name;
    set();
    get();
    }

    On the flex side can i create only a single class PersonDetail.as which contains all the 7 fields like this ?

    [RemoteClass(alias="myapp.PersonDetail ")]
    [Bindable]
    public final class PersonDetail
    {
    public var jailcode:String;
    public var jailtime:String;
    public var personrace:String;
    public var personage:String;
    public var email:String;
    public var id:String;
    public var name:String;
    }

    or is there a better way to do this?

    thanks
    Last edited by jaggernat; Feb 10th, 2011 at 10:04 PM.

  2. #2
    Join Date
    Dec 2010
    Location
    Singapore
    Posts
    302

    Default

    or is there a better way to do this?
    If the inheritance structure doesn't make sense in the flex-side, i'd not add them Person and Base). You can just have one class in the flex-side (having all the fields)
    Amila Domingo

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •