Please file a Github issue so we don't forget to investigate further. Thanks, -Alex
On 4/14/19, 10:24 AM, "Carlos Rovira" <carlosrov...@apache.org> wrote: 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 https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7Ce64890527ab4492d16be08d6c0fe0001%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636908594497126900&sdata=mEJmP9R9goZoTW5DSjIZH5P4%2B0fgBEIXlGch%2BVc1pOU%3D&reserved=0