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;|
Please help. I have no idea why such a simple function will not work.
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)