01-13-2012 08:11 PM
Do anyone know if it is possible through AIR to do threading? or any kind of backgroundworker? Am working on a webservice tests and could use a threading to fetch data through webservices for caching in the app as the application seem to hang until the data have been fetched and gives a horrible user experience.
01-14-2012 03:15 AM
What are you using to fetch the data? I use an URLLoader which can asynchronously fetch the data and dispatches an event when the data is ready. This way the UI stays responsive.
Adobe AIR has no threads I'm afraid and no backgroundworkers. This is mostly resolved wiht asychronous calls, but there is another solution called green threading. No personal experience though.
01-14-2012 10:38 AM
01-14-2012 02:14 PM
Yes it was not a small amount of data, so I rewrote the webservice on the serverside to provide less information for the initial view and then created a syncronize function for caching of data since last a synch was done instead, and that helped. But also think that using amCharts is a little heavy for the PB when trying to load 4 graphs onto the same page - or I still might need to optimize the code some further.
I am still messing around with AIR and trying to see what I can get out of the API's
btw is there an easy way to invoke C++ dll's? tried to edit image metadata with no luck and since I already have an dll who can do the job for images, ms documents and sound tags, then thought, that I might give that a try on the PB as well.
01-14-2012 02:26 PM
01-15-2012 12:18 PM
By the way, at some future time, it will likely be possible to use some form of general-purpose threads with Flash on the PlayBook.
01-15-2012 12:57 PM
01-17-2012 03:45 AM