1 Reply Latest reply on Mar 9, 2009 8:49 AM by Newsgroup_User

    Webservice call and classes

    Tor...
      Hi all,

      I'm trying to define a class in ActionScript (Flex 3) with a webservice call. This class will only do the call and write the result to a private variable. This variable can be read with a getter function. The call works and the result is written to the specific variable, but the calling script is to fast...

      The triggering script creates the class instance and calls the method which performs the webservice call, after this action the script will read the getter to get the results. This should return the result of the call but this method returns the default value. My guess is the call to get the result (getter) is performed before the result is returned and written to the instance variable of the class (asynchrone webservice call). I'm not sure how to solve this problem, does anyone has some ideas?

        • 1. Re: Webservice call and classes
          Level 7

          "Tor..." <webforumsuser@macromedia.com> wrote in message
          news:gp2jnn$d2$1@forums.macromedia.com...
          > Hi all,
          >
          > I'm trying to define a class in ActionScript (Flex 3) with a webservice
          > call.
          > This class will only do the call and write the result to a private
          > variable.
          > This variable can be read with a getter function. The call works and the
          > result
          > is written to the specific variable, but the calling script is to fast...
          >
          > The triggering script creates the class instance and calls the method
          > which
          > performs the webservice call, after this action the script will read the
          > getter
          > to get the results. This should return the result of the call but this
          > method
          > returns the default value. My guess is the call to get the result (getter)
          > is
          > performed before the result is returned and written to the instance
          > variable of
          > the class (asynchrone webservice call). I'm not sure how to solve this
          > problem,
          > does anyone has some ideas?

          http://www.rubenswieringa.com/blog/binding-read-only-accessors-in-flex
          http://www.joelconnett.com/flex-binding-to-a-custom-getter.html