Posts Tagged ‘Flex’

Flex threading w/ Web Workers

No Comments »

One place where Flash falls short is threading.  Unfortunately it is not possible to create threads using the current version of the Flash Player. (10 point something something at the time of this writing)  What this means is if you have a large dataset you need to parse through, and you simply use an recursive function or iterator, the ActionScript Virtual Machine (AVM from now on) simply enters the loop and nothing else gets processed until this loop is done.  Where this becomes problematic is when it keeps the UI from redrawing.  If the UI becomes unresponsive for a non-trivial amount of time, the user can become frustrated and may stop using your app. Furthermore, if your script takes longer than the predefined (and not really overrideable) amount of time, Flash spits out an execution time limit exceeded error which kills code execution.  And nobody wants any code to be killed. So what we need is a work-around for no threads. Read the rest of this entry »


One data collection to rule them all, or Simulating SQL queries in Flex

3 Comments »

Many times in the process of developing user interfaces I’ve needed to use the same base data in multiple views.  For instance, say I have a collection of books stored in my model. In one view I may have the newest books while in another I could just be showing books by a certain author. In the following example I show what happens when you try to use one collection in several views. Read the rest of this entry »