2 Replies Latest reply on Jun 9, 2007 9:43 PM by seattlemike

    lastResult Scope in Private Functions?

      The code for my app is below. I can access the data in lastResult fine if I do the HTTPService.send() ourside of my private function and also access lastResult outside of my private function, however if I put the HTTPService.send() call inside my private function I get "cannot access property of null object" error and traces show lastResult is null. Any idea on what's happening? My ASP page DOES return data so the null isn't a result of no data being returned. Thanks.

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="absolute">
      <mx:Model id="paramModel">
      <offeringName>Math 101</offeringName>


      private function render():void{
      debug.text = myHTTPData.lastResult.offeringName[0];

      <mx:HTTPService id="myHTTPData" method="GET"
      url=" http://myServer/myASPPage.asp" //contains actual valid URL in my version

      <mx:Form width="819">
      <mx:Button x="178" y="10" label="Button" click="render();"/>
      <mx:TextInput id="offeringName" x="10" y="10"/>
      <mx:TextArea x="10" y="223" id="debug" width="712" height="159" fontFamily="Courier New" fontSize="10" color="#4a29b4" fontWeight="bold"/>