Your RO variable is out of scope, you defined as a local variable to the
constructor. You need to set it up outside of there.

public class ProjectGateway {
          private var RO:RemoteObject;

          ProjectGateway()
          {
               RO = new RemoteObject();
               RO.destination = "ColdFusion";
               RO.source = "com.isavepets.projects.projectGateway";
               RO.addEventListener(FaultEvent.FAULT, faultHandler);
               var list:Operation = new Operation(RO, "list");
          }

ProjectGateway.as
package com.isavepets.projects
{
     import mx.collections.ArrayCollection;
     import mx.controls.Alert;
     import mx.rpc.events.FaultEvent;
     import mx.rpc.remoting.Operation;
     import mx.rpc.remoting.RemoteObject;

     public class ProjectGateway
     {
          public function ProjectGateway()
          {
               var RO:RemoteObject = new RemoteObject();
               RO.destination = "ColdFusion";
               RO.source = "com.isavepets.projects.projectGateway";
               RO.addEventListener(FaultEvent.FAULT, faultHandler);
               var list:Operation = new Operation(RO, "list");
          }

          public function list():ArrayCollection {
               var projectData:ArrayCollection = RO.list();
               return projectData;
          }

          private function faultHandler(e:FaultEvent):void {
               Alert.show(e.fault.message, 'Project Gateway Error');
          }

     }
}

Thank You
Dan Vega
[email protected]
http://www.danvega.org

Reply via email to