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
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?
You will need a reference to the MXML instance that holds the
mx:RemoteObject. If it is the main app, then use
For example if I use the instance I can also access the method, however he will have no effect on the instance that is running now, using the static I get it but I bump into the problem.