4 Replies Latest reply on Dec 11, 2007 11:08 AM by Praeter

    Error #1009: Cannot access a property or method of a null object reference.

    Praeter
      Well I'm stumped. I have researched the issue for 5 hours now and can't seem to come any closer to understand what the issue is. I receive an error occurs while the program is adding elements to an Object. After 10 elements are added it goes into the error state and the program will not proceed. I do have proceeding warnings: "warning: unable to bind to property 'xxx' on class 'Object' (class is not an IEventDispatcher)" but if I comment out element 11-24, the program executes to completion with only the warnings, so I don't see the warnings as a show stopper. Also, the error is thrown despite which data element is the 11th. Essentially, the function is an executed result of a button click that is to take all the current text elements in the web form, assign them to an object and then send the data object to a web service to update the database. Any ideas are greatly appreciated.


      <code>

      private function DataUpdate():void {

      LastCmd = "DataUpdate";

      var outDataSet:Object = new Object;
      outDataSet.userEmail = this.email.text;
      outDataSet.userAddr1 = this.AddrOne.text;
      outDataSet.userAddr2 = this.AddrTwo.text;
      outDataSet.userCity = this.AddrCity.text;
      outDataSet.userState = this.AddrState.text;
      outDataSet.userZip = this.AddrZip.text;
      outDataSet.userOfficePhone = this.OfficePhone.text;
      outDataSet.userHomePhone = this.HomePhone.text;
      outDataSet.userCellPhone = this.CellPhone.text;
      outDataSet.userFax = this.Fax.text;
      outDataSet.agencyName = this.AgencyName.text;
      // outDataSet.agencyAddr1 = AgencyAddrOne.text;
      /* outDataSet.agencyAddr2 = AgencyAddrTwo.text;
      outDataSet.agencyCity = AgencyCity.text;
      outDataSet.agencyState = AgencyState.text;
      outDataSet.agencyZip = AgencyZip.text;
      outDataSet.agencyOfficePhone = AgencyPhone.text;
      outDataSet.agencyFax = AgencyFax.text;
      outDataSet.agencyWeb = AgencyWeb.text;
      outDataSet.billAgent = BillAgent.selected;
      outDataSet.billAcency = BillAgency.selected;
      outDataSet.fwdOfficePhone = FwdOffice.selected;
      outDataSet.fwdCellPhone = FwdCell.selected;
      outDataSet.fwdHomePhone = FwdHome.selected;
      outDataSet.fwdAgentEmail = FwdEmail.selected;

      */
      var data:Object = new Object;
      data.database = "auth";
      //data.query = query;
      data.DSet = outDataSet;
      data.table = "user_detail";
      data.where = "username = '"+Auth.LoggedInUser+"'";

      var RequestArray:Object = new Object;
      RequestArray.cmd = "updateDB";
      RequestArray.data = data;

      PTservice.getOperation("doorway").send(RequestArray);
      }