1 Reply Latest reply on Dec 21, 2011 11:35 AM by DrDTP

    Error 1010 A term is undefined and has no properties


      First let me say that I have seen discussions about this error in this forum. Unfortunately, I have not found a good answer and I have not found a posting related to php data services. I am using Flashbuilder 4.6 with SDK 4.6. PHP is server side, data services are developed with the Zend Framework and the database is My Sql. I am receiveing the error 1010 when I try to use a dataService.last result. See the below code. The original function was a lot longer but I have debugged it down to these few lines.


      var email:String = emailText.text;

      var password:String = passwordText.text;

      getT_userByLoginResult.token = tuserService.getT_userByLogin(email, password);

      var lastname:String = getT_userByLoginResult.lastResult.lname;



      • The function getT_userByLoginResult works perfectly when I test the data service using the exact same values for email and password.
      • The input types and return types are configured correctly.
      • There are no errors or warnings when I save and compile the application.
      • This function is in Main.mxml.
      • The email and password variables are correctly set when I debug and look at the variables tab.
      • If I set the var lastname to a literal string it works. When I set to the lastResult and debug and the variable lastname is undefined in the variables tab.
      • The problem appears to be with getT_userByLoginResult.lastResult.lname. I have also tried to set the variable to other values. They do not work.
      • If I use getT_userByLoginResult.addEventListener("ResultEvent.RESULT", set user); the listener will not fire.
      • The code will run correctly until it gets to the line where I try to set a variable using the lastResult.ValuesFromTheTable.


      Please help. I have no idea why such a simple function will not work.

        • 1. Re: Error 1010 A term is undefined and has no properties
          DrDTP Level 1

          I discovered the problem. When the addEventListener parameters are set the ResultEvent.RESULT should NOT be in quotes although the flashbuilder help documentation states the type as String. The application will compile without errors whether or not you use a string. By the way, if you wait for the code completion dropdown the ResultEvent.RESULT (no quotes) is an option.


          myFunction.addEventListener(ResultEvent.RESULT, myOtherFunction) <> myFunction.addEventListener("ResultEvent.RESULT", myOtherFunction)