1 Reply Latest reply on Apr 26, 2007 11:38 AM by Newsgroup_User

    What is wrong with this super() statement?

    GenePilot
      I created a simple class:

      <File: MainTab.as>
      package Whirlpool.Buttons
      {
      import TGS.Button.ButtonObj;
      public class MainTab extends ButtonObj
      {
      MainTab()
      {
      super();
      }
      }
      }
      But I'm getting this error:
      1007: A super statement can be used only inside class instance constructors.

      Can anybody tell me what I'm doing wrong?
        • 1. Re: What is wrong with this super() statement?
          Level 7
          You have not correctly defined your constructor. You need to define your
          constructor as a function

          public function MainTab(){
          super();
          }

          "GenePilot" <webforumsuser@macromedia.com> wrote in message
          news:f0qr77$l45$1@forums.macromedia.com...
          >I created a simple class:
          >
          > <File: MainTab.as>
          > package Whirlpool.Buttons
          > {
          > import TGS.Button.ButtonObj;
          > public class MainTab extends ButtonObj
          > {
          > MainTab()
          > {
          > super();
          > }
          > }
          > }
          > But I'm getting this error:
          > 1007: A super statement can be used only inside class instance
          > constructors.
          >
          > Can anybody tell me what I'm doing wrong?
          >