Hello,
I am migrating a wrapper between my app. flex and the backend (AMF - FluorineFX 
- .net). (Apache Flex - works ok)
I cannot add the listener of the result of any method. I compile well but when 
I run it gives me an error.

This is the wrapper ...

package flexfx.wpl
    {
    ...
    import mx.collections.ArrayCollection;
    import mx.core.FlexGlobals;
    import mx.messaging.Channel;
    import mx.messaging.ChannelSet;
    import mx.messaging.channels.AMFChannel;
    import mx.messaging.channels.SecureAMFChannel;
    import mx.messaging.config.ServerConfig;
    import mx.rpc.AsyncToken;
    import mx.rpc.IResponder;
    import mx.rpc.events.FaultEvent;
    import mx.rpc.events.ResultEvent;
    import mx.rpc.remoting.RemoteObject;

    import flexfx.wpl.wplNetPrModel;
    import flexfx.wpl.vo.CTypeUser;
    import flexfx.wpl.voPres.CTypeModelVecIni;
    import flexfx.wpl.voPres.CTypeParNotiPres;

    public class wplNetPr
    {
      private var remoteObject:RemoteObject;
               [Bindable]public var model:wplNetPrModel;
               private var Glb:GlobalVars=GlobalVars.getInstance()
               private var Gnr:General = General.getInstance();
                    ...
      public function wplNetPr( modelo:wplNetPrModel = null )
      {
                           var channelSet:ChannelSet = new ChannelSet();
                           var channel:Channel;

                           if (modelo.isSecure){
                                  modelo.destination = "fluorineSecure";
                                  channel = new 
SecureAMFChannel(null,"Gateway.aspx");
                           }else{
                                  modelo.destination = "fluorine";
                                  channel = new AMFChannel(null,"Gateway.aspx");
                           }

                           channelSet.addChannel(channel);
                           remoteObject  = new RemoteObject(modelo.destination);
                           remoteObject.requestTimeout = -1;
                           remoteObject.showBusyCursor = true;
                           remoteObject.source = "flexfx.wpl.wplNet";
                           remoteObject.channelSet = channelSet;

                           this.model = modelo
  [ERROR]       
remoteObject.GetVersion.addEventListener("result",GetVersionHandler);
                           
remoteObject.inicializar.addEventListener("result",inicializarHandler);
                           remoteObject.addEventListener("fault", onFault);
...

SyntaxError: Unexpected token ';'
TypeError: this.flexfx_wpl_wplNetPr_remoteObject.getProperty(...).callProperty 
is not a function
    at new flexfx.wpl.wplNetPr 
(h:\Proyectos\TestFluorine\src\main\royale\flexfx\wpl\wplNetPr.as:67:29)
    at AppWPNet.AppWPNet_AppComplet 
(h:\Proyectos\TestFluorine\src\main\royale\AppWPNet.mxml:54:14)
    at AppWPNet.$EH1 
(h:\Proyectos\TestFluorine\src\main\royale\AppWPNet.mxml:7:28)
    at AppWPNet.goog.events.EventTarget.fireListeners 
(h:\Proyectos\TestFluorine\bin\js-debug\library\closure\goog\events\eventtarget.js:284:24)
    at Function.goog.events.EventTarget.dispatchEventInternal_ 
(h:\Proyectos\TestFluorine\bin\js-debug\library\closure\goog\events\eventtarget.js:381:27)
    at AppWPNet.goog.events.EventTarget.dispatchEvent 
(h:\Proyectos\TestFluorine\bin\js-debug\library\closure\goog\events\eventtarget.js:196:35)
    at AppWPNet.org.apache.royale.events.EventDispatcher.dispatchEvent 
(h:\Proyectos\TestFluorine\bin\js-debug\org\apache\royale\events\EventDispatcher.js:71:80)
    at AppWPNet.org.apache.royale.core.HTMLElementWrapper.dispatchEvent 
(h:\Proyectos\TestFluorine\bin\js-debug\org\apache\royale\core\HTMLElementWrapper.js:245:81)
    at AppWPNet.org.apache.royale.jewel.Application.initialize 
(h:\Proyectos\TestFluorine\bin\js-debug\org\apache\royale\jewel\Application.js:304:9)
    at AppWPNet.org.apache.royale.jewel.Application.start 
(h:\Proyectos\TestFluorine\bin\js-debug\org\apache\royale\jewel\Application.js:264:11)
...

I have no idea what happens, can you give me a hand?
Thank you.

M.José

Reply via email to