You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@royale.apache.org by Christofer Dutz <ch...@c-ware.de> on 2020/07/16 15:14:37 UTC

Defining a result handler in a element

Hi all,

I am currently doing my first steps with stuff that’s more sophisticated than my PLC4X Hello World.
While porting some of the concepts I had with my existing Flex codebase I did stumble over one thing.

In Flex I used to have definitions like this:

<fx:Declarations>
    <mx:RemoteObject id="conferenceService"
                     destination="conferenceService"
                     fault="onError(event)">
        <mx:method name="creeate" result="onCreateResult(event)"/>
        <mx:method name="read" result="onReadResult(event)"/>
        <mx:method name="update" result="onUpdateResult(event)"/>
        <mx:method name="delete" result="onDeleteResult(event)"/>
        <mx:method name="list" result="onListResult(event)"/>
    </mx:RemoteObject>
</fx:Declarations>

Now it seems the result handles aren’t called in Royale.

But if I call a method like this:


var responder:Responder = new Responder(onListResult, onError);
var token:AsyncToken = conferenceService.list();
token.addResponder(responder);

Everything seems to work … am I doing something wrong or is the above notation just not supported?

Chris



Re: Defining a result handler in a element

Posted by Carlos Rovira <ca...@apache.org>.
Hi Chris,

I guess the "result" was never implemented. I think that was something to
wire in the compiler since is special notation itself.
I think it's better to add an issue in the compiler so we can take a look
at it.

Thanks

El jue., 16 jul. 2020 a las 17:14, Christofer Dutz (<
christofer.dutz@c-ware.de>) escribió:

> Hi all,
>
> I am currently doing my first steps with stuff that’s more sophisticated
> than my PLC4X Hello World.
> While porting some of the concepts I had with my existing Flex codebase I
> did stumble over one thing.
>
> In Flex I used to have definitions like this:
>
> <fx:Declarations>
>     <mx:RemoteObject id="conferenceService"
>                      destination="conferenceService"
>                      fault="onError(event)">
>         <mx:method name="creeate" result="onCreateResult(event)"/>
>         <mx:method name="read" result="onReadResult(event)"/>
>         <mx:method name="update" result="onUpdateResult(event)"/>
>         <mx:method name="delete" result="onDeleteResult(event)"/>
>         <mx:method name="list" result="onListResult(event)"/>
>     </mx:RemoteObject>
> </fx:Declarations>
>
> Now it seems the result handles aren’t called in Royale.
>
> But if I call a method like this:
>
>
> var responder:Responder = new Responder(onListResult, onError);
> var token:AsyncToken = conferenceService.list();
> token.addResponder(responder);
>
> Everything seems to work … am I doing something wrong or is the above
> notation just not supported?
>
> Chris
>
>
>

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