On Feb 7, 2008 5:38 PM, den.orlov <[EMAIL PROTECTED]> wrote:
> I wrote RemoteObject's sublcass that contains functionality common
> for all my appp's RemoteObjects:
>
> public dynamic class MyRemoteObject extends RemoteObject {
>
> public function MyRemoteObject()
> {
> super();
> this.showBusyCursor = true;
> this.requestTimeout=10;
>
> addEventListener(FaultEvent.FAULT, onFault);
> }
>
> ...
> }
>
> When I use it in my mxml files:
>
> <cust:MyRemoteObject id="ro" destination="dest">
> <mx:method name="getAll" result="onGetAllResult(event)"/>
> </cust:MyRemoteObject>
>
> compiler can't recognize mx:method tag. Is there any way to
> workaround this?
It's mx:operation and not mx:method. Also, you don't use result on the
mx:operation, that is on the mx:WebService tag. Here is an example:
<mx:WebService id="companyService"
wsdl="http://localhost:8080/accounting/services/CompanyService?wsdl"
showBusyCursor="true" fault="Alert.show(event.fault.toString(),
'Error');" result="showResult(event);" useProxy="false">
<mx:operation name="saveCompany">
<mx:request>
<company_id>{companyId.text}</company_id>
</mx:request>
</mx:operation>
</mx:WebService>
Hope that helps.
All the best,
Fidel.