2 Replies Latest reply on Feb 6, 2011 5:28 AM by ^^GOUST^^

    static method called method is not static.

    ^^GOUST^^

      Initially I got a call to the java method


      <mx:RemoteObject id="CompanyDao" destination="
      CompanyDao" fault="onFaultServiceCompanyDao(event)">
           <mx:method name="
      indexedListCompany" result="onResultIndexedListCompany(event)" fault="onFaultIndexedListCompany(event)"/>
      </ mx: RemoteObject>

       

      Give the script I have a static method, because it is a method which is accessed by another class.

      And he declared as static, to be referenced is the class, otherwise I would have to instantiate the class or screen to access it, but the program still would not work correctly.

                 
                  public static function RegistrationCompanyDataCalls(id_company:String):void
                  {
                      CompanyDao.indexedListCompany(Application.application.lblTelaPrincipal.text, id_company);
                  }

       

      But how is this method is static, it gives an error saying I can not access the method CompanyDao.

       

      I researched and learned that static method can not access non-static method.

      Does anyone know a way around this?