1 Reply Latest reply on Sep 12, 2008 11:41 AM by Gregory Lafrance

    Extend multiple Classes at once

    ericbelair Level 1
      I have several Classes which are bases for other Classes:

      public class ABase
      {
      public var aBaseProp:int;
      }

      public class BBase
      {
      public var bBaseProp:int;
      }

      I extend these base classes to other classes:

      public class AExtension1 extends ABase
      {
      public var aExt1Prop:int;
      }

      public class AExtension2 extends ABase
      {
      public var aExt2Prop:int;
      }

      public class BExtension extends BBase
      {
      public var bExtProp:int;
      }

      What I want to do is create a class that can access the properties from both the ABase and BBase classes. I tried this:

      public class ABExtension extends ABase, BBase
      {
      public var abExtProp:int;
      }

      ...but it won't compile.

      Is there an easy way to do this??? An interface, perhaps? Looking for ideas/suggestions/best practices.

      Thanks a lot...