This has been a tremendous help and has got me going strong. I am having one issue and that is how to return the data back to a list on the page. I can't seem to find the right code to make that happen. Can you help with the code on the class side and what the code looks like on the main page. I know that's a lot to ask but it sure would be helpful.
I did not go with the Singleton Class method...I used the example code that you posted the link to.
Thanks for all your help.
I am still hoping for some help on how to pass the value back to my main screen. I can get the value...just don't know how to pass the data back.
I showed it in the other thread
unless you are using async connection to the database. In which case you'll need to extend the eventdispatcher and use a custom event
If I type it as you showed in the example, I get a "1170: Function does not return a value." error when I try to save the AS document. Here's what my code looks like:
public function getThings():ArrayCollection
stmt = new SQLStatement();
stmt.sqlConnection = sqlConnection;
stmt.text = "SELECT * FROM contract";
well you are supposed to write your own methods, it was just an example
but you just add a return
var r:ArrayCollection = new ArrayCollection(stmt.getResult().data);
Thank you Kokorito...you've been a tremendous help and I appreciate it very much!
Well, hopefully you're still up for answering another question...how do I pass the data back to the class? For example, I want to populate the SQL string with a value from a text input from the main screen. The code I've tried to write in the class doesn't recognize any of the variables from the main screen.