3 Replies Latest reply on Dec 29, 2008 1:59 PM by Newsgroup_User

    Invoking an AS RemoteObject

    wkolcz Level 1
      Please be patient, I am new to this :-)

      I am trying invoke a RemoteObject that is in a Class from a code behind AS file. But I am getting this error: TypeError: Error #1009: Cannot access a property or method of a null object reference.

      Here is my CB:

      import mx.collections.ArrayCollection;
      import com.isavepets.projects.ProjectGateway;

      [Bindable]
      public var projectData:ArrayCollection = new ArrayCollection();
      public var ProjGateway:ProjectGateway = new ProjectGateway();;

      public function initApp():void {
      projectData = ProjGateway.list();
      }

      What am I missing? Thanks!
        • 1. Re: Invoking an AS RemoteObject
          Level 7

          "projectproofing" <webforumsuser@macromedia.com> wrote in message
          news:giqugk$7hu$1@forums.macromedia.com...
          > Please be patient, I am new to this :-)
          >
          > I am trying invoke a RemoteObject that is in a Class from a code behind AS
          > file. But I am getting this error: TypeError: Error #1009: Cannot access a
          > property or method of a null object reference.
          >
          > Here is my CB:
          >
          > import mx.collections.ArrayCollection;
          > import com.isavepets.projects.ProjectGateway;
          >
          > [Bindable]
          > public var projectData:ArrayCollection = new
          > ArrayCollection();
          > public var ProjGateway:ProjectGateway = new ProjectGateway();;
          >
          > public function initApp():void {
          > projectData = ProjGateway.list();
          > }
          >
          > What am I missing? Thanks!

          Already answered on flexcoders.


          • 2. Re: Invoking an AS RemoteObject
            wkolcz Level 1
            Either I didn't see it or this is a different topic. I got help with creating it, but never saw anything for trying to invoke it.
            • 3. Re: Invoking an AS RemoteObject
              Level 7

              "projectproofing" <webforumsuser@macromedia.com> wrote in message
              news:gjbbaa$lvd$1@forums.macromedia.com...
              > Either I didn't see it or this is a different topic. I got help with
              > creating it, but never saw anything for trying to invoke it.

              The code I gave you on the flexCoders list invokes it, etc.

              Look at the execute() function
              http://tech.groups.yahoo.com/group/flexcoders/message/133052