I'm building an AIR app following the MVC pattern. Several parts of the model
have to be loaded or created before the view can be initialized. I'm doing it
like this - which works, but seems clunky. Is there a better way? From the main
class of the model:
public function Model() {
_database
It does not look that bad.
Since you know how many items have to be load, you may engage a counter:
private function handleComplete(e:Event) {
_loadCount++;
if (_loadCount == 2) {
dispatchEvent(new Event(Event.COMPLETE));
}
}
:-)
Am 18.03.2011 02:09, schrieb Mattheis, Erik
2 matches
Mail list logo