Hi Spiros,

thanks for sharing. Hopefully Alex or Greg could give more info if there's
some issue and if it can be fixed.

best

Carlos



El jue., 11 abr. 2019 a las 12:00, spiros (<agg...@novusnet.gr>) escribió:

> Hi,
>
>
>
> For RemoteObject  with more  than One Methods in server side (Operations )
> it is possible to define event Listeners per Operation.
>
> For example the  two lines (*1) defines two listeners (result and fault )
> for the Operation getText() .
>
> In the (*2)the  code  remove of the listeners.
>
> In RoyaleJS the (*1) generate  the error code : "TypeError:
>
> this.com_novusnet_jsTests_RemoteObjectOperation_remoteObject.getProperty(...
> ).callProperty is not a function " , the JS line the compiler produce is
> (*3).
>
> For the (*2)  the JS code is (*4) and there is no error but stop the
> execution of function , - probably because of try - catch block- .
>
> A workaround for the problem is to use  the getOperation method :
>
>
>
>
> remoteObject.getOperation("getText").removeEventListener(ResultEvent.RESULT,
> getdataResultHandler);
>
>
>
>
>
> I hope the above is useful.
>
>
>
>
>
> Best
>
>
>
>
>
>
>
> Spiros
>
>
>
>
>
>
>
>
>
>
>
> (*1)
>
> remoteObject.getText.addEventListener(ResultEvent.RESULT,
> getdataResultHandler);
>
> remoteObject.getText.addEventListener(FaultEvent.FAULT,
> getTextFaultHandler);
>
>
>
>
>
> (*2)
>
> remoteObject.getText.removeEventListener(ResultEvent.RESULT,
> getdataResultHandler);
>
> remoteObject.getText.removeEventListener(FaultEvent.FAULT,
> getTextFaultHandler);
>
>
>
> (*3)
>
>
> this.com_novusnet_jsTests_RemoteObjectOperation_remoteObject.getProperty('ge
> tText').callProperty('addEventListener', mx.rpc.events.ResultEvent.RESULT,
>
> org.apache.royale.utils.Language.closure(this.com_novusnet_jsTests_RemoteObj
> ectOperation_getdataResultHandler, this, 'getdataResultHandler'));
>
>
>
> this.com_novusnet_jsTests_RemoteObjectOperation_remoteObject.getProperty('ge
> tText').callProperty('addEventListener', mx.rpc.events.FaultEvent.FAULT,
>
> org.apache.royale.utils.Language.closure(this.com_novusnet_jsTests_RemoteObj
> ectOperation_getTextFaultHandler, this, 'getTextFaultHandler'));
>
>
>
> (*4)
>
>
> this.com_novusnet_jsTests_RemoteObjectOperation_remoteObject.getProperty('ge
> tText').callProperty('removeEventListener',
> mx.rpc.events.ResultEvent.RESULT,
>
> org.apache.royale.utils.Language.closure(this.com_novusnet_jsTests_RemoteObj
> ectOperation_getdataResultHandler, this, 'getdataResultHandler'));
>
>
>
> this.com_novusnet_jsTests_RemoteObjectOperation_remoteObject.getProperty('ge
> tText').callProperty('removeEventListener', mx.rpc.events.FaultEvent.FAULT,
>
> org.apache.royale.utils.Language.closure(this.com_novusnet_jsTests_RemoteObj
> ectOperation_getTextFaultHandler, this, 'getTextFaultHandler'));
>
>

-- 
Carlos Rovira
http://about.me/carlosrovira

Reply via email to