Is your reading/processing mechanism the same for all XML files?

A good approach would be to create a buffer queque with an Array. you push()
in all the files you need to read,
then pop out one after another and process it. When the last file was
processed and the buffer is empty, start your App.

hth 

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of jcarlos
Sent: Wednesday, June 07, 2006 1:22 PM
To: Flashcoders mailing list
Subject: [Flashcoders] callBack for Beginners ?

Hi All, 

I need help  

I trying to develop some small app that read a Parameters list from a XML
file and then if succeded, read other XML files as specified by the
Parameters file and only after these files were read and succeed the app
would start, what is usually get with something like this 

..........................................................................
  1.. var myParameters:XML = new XML(); 
  2.. myParametersignoreWhite = true; 
  3.. myParameters.onLoad = function(success) 
  4.. { 
  5..     if ( success) 
  6..    { 
  7..        //  get the Paramenters from myParameters 
  8..        //  begin reading other  XML files 
  9..        // wait for them to succed 
  10..        //  start app 
  11..    } 
  12.. }; 
  13.. myParameters.load("parameters.xml");
....................................................................

but I´m guessing how to do it in a clean way, because after some files it
gets messy and hard to read and mantain, 

how could I make each XML loading dispatch some special event after it
succed to the main app and only after all events of all files occurred it
would start it ??    

Should the main app be implemented as some kind of OBSERVER pattern where it
stays listening to these events ?

João Carlos
Rio Brazil
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to