4 Replies Latest reply on Aug 24, 2006 9:10 AM by ntsiii

    1119 - ERROR - Please Help

      Please help me with this..

      I am getting the following error

      -- 1119: Access of possibly undefined property result through a
      reference with static type mx.rpc.http.mxml:HTTPService..

      The code i am using is as follows.. I am getting the the error in
      the line where the tag <mx:Model> is defined.. Pleae let me know if
      I can use the xml file, which is in my local computer when using the
      following code..
      data.xml file is in the D drive of my computer

      <?xml version="1.0" encoding="utf-8"?>

      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml"
      width="100%" height="100%"

      <mx:HTTPService id="srv" url="data.xml"/>

      <mx:Model id="results">{srv.result.data.result}</mx:Model>

      <mx:LineChart id="chart" dataProvider="{results}"
      showDataTips="true" width="100%" height="100%">

      <mx:CategoryAxis dataProvider="{results}"

      <mx:LineSeries yField="apple" name="Apple"/>
      <mx:LineSeries yField="orange" name="Orange"/>
      <mx:LineSeries yField="banana" name="Banana"/>


        • 1. Re: 1119 - ERROR - Please Help
          im new here and havent worked with datamodels but a quick look in the help file showed this as example syntax.

          <mx:Model source="employees.xml" id="employee1"/>


          <mx:Model source=" http://www.somesitel.com/employees.xml" id="employee2"/>
          • 2. Re: 1119 - ERROR - Please Help
            You might want to try using lastResult as result is no longer supported after beta2 or 3.

            So your code looks like this.

            <mx:Model id="results">{srv.result.data.result}</mx:Model>

            It should look like this.

            <mx:Model id="results">{srv.lastResult.data.result}</mx:Model>

            let me know if that works.

            • 3. Re: 1119 - ERROR - Please Help
              rashmi123 Level 1
              Thanks Manteratech. The solution given by you has worked. I am not getting the 1119 error.
              But there is one mor question to you.. Pls help me with this.

              <mx:Model id="results">{srv.lastResult.data.result}</mx:Model>

              In the above statement what is data.result ????? I have an XML file called data.xml and below are the contents..


              <total month="Jan-03">

              <total month="Feb-03">

              <total month="Mar-03">

              ERROR - Error: Unknown Property: 'apple'.

              Please help me with this. Thanks
              • 4. Re: 1119 - ERROR - Please Help
                ntsiii Level 3
                I find Model difficult to use because I have never been clear on exactly how it serializes xml into the object structure.

                You should consider useing resultFormat="e4x".

                I'd also skip the tag and use a result handler to put the xml directly into a variable. That wasy you can use toXMLString() to inspect the structure of your XML so as to know how to reference the data you want.

                Note that in a result handler function use event.result, not lastResult.