You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
1.
Create as3 project using FlashDevelop and Flex SDK
2.
Create test database
3.
private function handleConnected(e:Event):void {
var st:Statement = con.createStatement();
var token:MySqlToken = st.executeQuery("SELECT * FROM users LIMIT 10");
token.addEventListener(MySqlEvent.RESULT, onResult);
token.addEventListener(MySqlErrorEvent.SQL_ERROR, onError);
}
private function onResult(e:MySqlEvent):void {
var resultSet:ResultSet = e.resultSet as ResultSet;
//ERORR!!
/*
Error text:
ReferenceError: Error #1065: Variable ArrayCollection is not defined.
at global/flash.utils::getDefinitionByName()
at com.maclema.mysql::ResultSet/getRows()[/Users/Matt/Documents/Adobe Flash Builder Beta 2/asSQL_PureAS3/src/com/maclema/mysql/ResultSet.as:344]
*/
var ar:Array = resultSet.getRows();
for (var i:int = 0; i < ar.length; i++) {
trace(ar[i]);
}
trace("onResult", e.resultSet);
}
If you look at adobe reference about getDefinitionByName function
You will find, that it throws error ReferenceError ( — No public definition
exists with the specified name. )
Obviously, you should add try-catch block to this part of code.
PS And thank you for such good and useful library.
Original issue reported on code.google.com by [email protected] on 9 Jun 2010 at 9:05
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
[email protected]
on 9 Jun 2010 at 9:05The text was updated successfully, but these errors were encountered: