Thanks, but sadly the example has the same problem. Its MouseEvents are also marked as ambiguous. This is with the latest SDK 0.9.9

On 10/06/2022 14:58, Maria Jose Esteve wrote:

Hi, it might help to look at one of the examples included in the SDK:  “royale-asjs\examples\mxroyale\RemoteObjectAMFTest\src\main\royale”

Hiedra

*De:* Doug Simmons <doug777...@gmail.com>
*Enviado el:* viernes, 10 de junio de 2022 6:18
*Para:* users@royale.apache.org
*Asunto:* Re: Royale RemoteObject with ColdFuaion

Hi All,

I have added mx and can now use mx:RemoteObject, but now all my MouseEvents are marked as "Ambiguous Reference" even though I've chosen the js version.

I've seen things like -

 function myFunction(event : js::MouseEvent){

in other languages, but I can't find any way to specify which library to use in actionscript.

How do you get this to work?

Doug

On 07/06/2022 05:18, Alina Kazi wrote:

    Hi Doug,

    I have used mx:RemoteObject in several applications.

    Remote Object in declaration block of mxml file

    <mx:RemoteObject id="EPSObj" destination="{RODestination}"
    endpoint="{ROEndpoint}" showBusyCursor="true" source="{ROSource}">

    Responder and fault handlers I have added using AsyncTolen and
    Responder.

    var responder680:Responder = new
    Responder(on_sel_ScanDocTypeCd_SimpleRH, ROFaultHandler);

     var token680:AsyncToken =
    EPSObj.sel_ScanDocTypeCd_Simple((FlexGlobals.topLevelApplication
    as IEPS).getAppUserInfo(true));
    token680.addResponder(responder680); trace(token680);

    In some cases I have created the RemoteObject in actionscript
    class too and it works fine.

    In the above case the Result handler is: on_sel_ScanDocTypeCd_SimpleRH

    And fault handler is :

    ROFaultHandler

    Hope that helps.

    -Alina Kazi

    On Tue, 7 Jun 2022, 2:02 am Maria Jose Esteve, <mjest...@iest.com>
    wrote:

        Have you tried mx:RemoteObject?

        Hiedra

        *De:* Doug Simmons <doug777...@gmail.com>
        *Enviado el:* domingo, 5 de junio de 2022 6:38
        *Para:* users@royale.apache.org
        *Asunto:* Royale RemoteObject with ColdFuaion

        Hi,

        Apache Royale Remote Object API says it is suitable for use
        with ColdFusion, but I can't get it to work.

        In a Flex (AIR) project I have :

        <s:RemoteObject id="roWeDates" destination="ColdFusion"
        source="charts.PCWEDates">
            <s:method name="getmonthdates"
        result="roWEDatesResultHandler(event)"
        fault="roFaultHandler(event)"/>
        </s:RemoteObject>

        this.roWeDates.getmonthdates(this.yearChooser.selectedItem,
        this.monthChooser.selectedIndex + 1);

        and it all works perfectly.

        Now I need to get this working in a browser.

        So I have SDK Apache Royale 0.9.9 (JS only) (Bundled)

        <js:RemoteObject id="roWEDates" destination="ColdFusion"
        result="roWEDateResultHandler(event)"
        fault="roFaultHandler(event)"
                   
        endPoint="http://localhost:8500/charts/PCWEDates.cfc";
        <http://localhost:8500/charts/PCWEDates.cfc>/>

        this.roWEDates.send("getmonthdates",
        [this.yearChooser.selectedItem,
        this.monthChooser.selectedIndex + 1]);

        This compiles correctly and then when you run it and send to
        the CF method : -

        No data is returned from CF and neither result or fault
        handlers are triggered.

        The browser log shows :

        POSThttp://localhost:8500/popcharts/PCWEDates.cfc        
        [HTTP/1.1 302 Found 972ms]

        destination fault handler
        Object { code: -1005, message: "Invalid response.", detail:
        "", data: null }                Language.js:280:22

        I have tried with flex2gateway in the cfc url, but this causes
        a CORS preflight error.

        Does anyone have a solution?

        Doug

Reply via email to