2 Replies Latest reply on May 30, 2006 3:47 AM by poonamsheth

    Beta 3 breaks HTTPService

    Kwooda Level 1
      I just installed Beta 3 and am attempting to use an XML file as a data provider. I had it working fine in Beta 2. I even copied an example from the Beta 3 developer guide and I get the same error:
      Access of possibly undefined property result through a reference with static type mx.rpc.http.mxml:HTTPService.

      In the example in the guide, which looks like this:
      <mx:HTTPService id="srv" url="data.xml"/>
      <mx:Model id="results"><gen>{srv.result.data.result}</gen></mx:Model>
      <mx:AreaChart id="chart" dataProvider="{results.gen}" showDataTips="true">
      ...
      </mx:AreaChart>

      The error appears in the Model tag where it refers to srv.result.data.result.

      What is the fix/trick to make this work????????? It has me stuck in a real bind!

      UPDATE:
      No pun intended there on the bind comment.

      I figured out my problem - I had to change the "result" reference to "lastResult".
        • 1. Re: Beta 3 breaks HTTPService
          Level 7
          Kwooda wrote:
          > I just installed Beta 3 and am attempting to use an XML file as a data
          > provider. I had it working fine in Beta 2. I even copied an example from the
          > Beta 3 developer guide and I get the same error:
          > Access of possibly undefined property result through a reference with static
          > type mx.rpc.http.mxml:HTTPService.
          >
          > In the example in the guide, which looks like this:
          > <mx:HTTPService id="srv" url="data.xml"/>
          > <mx:Model id="results"><gen>{srv.result.data.result}</gen></mx:Model>
          > <mx:AreaChart id="chart" dataProvider="{results.gen}" showDataTips="true">
          > ...
          > </mx:AreaChart>
          >
          > The error appears in the Model tag where it refers to srv.result.data.result.
          >
          > What is the fix/trick to make this work????????? It has me stuck in a real
          > bind!
          >

          Hi Kwooda,

          The "result" property of HTTPService has changed to "lastResult". For
          more information, see the Beta 2 to Beta 3 change list:

          http://labs.adobe.com/wiki/index.php/Flex:Beta_2_to_Beta_3_Changes

          Thanks,

          nj
          Flex Builder team
          • 2. Re: Beta 3 breaks HTTPService
            poonamsheth Level 1
            I haven't changes result to lastResult yet, per the changes from B2 to
            B3. However, my applications still work fine.
            now the question is ..Will result be
            depreciated in the final release? And, why the name change?
            -----------
            Event.result remains the same, only myservice.myOp.result changed to
            lastResult.

            The reason is because there was some fear over confusion with
            the result property and the result event. It's a semi-arbitrary rule
            that allows the MXML compiler to figure out what you mean (in this case
            result is a read-only property so since you can't assign to it use the
            event). Also lastResult makes it pretty clear that this is the last
            result returned for the service regardless of how many times you might
            have executed it.