I had to do something similar for some network opereations, so here's what you
can do...

Instantiate your objects into a list, call the handler in each object one at a
time by stepping the index, or instantiate each object one at a time.
Have the object's handler set a flag (or property) when the operation is
complete.
Next have an exitframe script keep checking for the status of the current objects
flag.
When it sets the flag, move on to the next object/task.

here's a Cliff's notes version:

myObj = new(script "myParentScript", param, param, etc...)
myObj.pFlag = FALSE (or you could set any number of ways or leave the value null
until you set to TRUE, whatever...)

on objectHandler me, whatever
    -- do something
    -- do something else
    myObj.pFlag = TRUE
end

on exitframe
    global myObj, myObj2, myObj3
     if objectP(myObj) AND myObj.pFlag = TRUE then
        -- call next object
    else if objectP(myObj2) AND myObj2.pFlag = TRUE then
        -- call next object
    else if objectP(myObj3) AND myObj3.pFlag = TRUE then
        -- you're outa here...
        -- clean up or whatever
    end if
end

HTH,

Andy Driscoll
sunzen *


Dennis Flood wrote:

> I'm imagining re-coding using a scheme where I take all my code for these
> routines and create a list with "commands" which execute each step in the
> code. I'd then create a list processing engine that could be stopped and
> restarted by tracking the position in a variable and starting a timeout
> object when it encountered a wait command.
>
> Just seems like there should be an easier way.
>
> Anyone have any thoughts on this??
>
> Thanks,
>
> Dennis Flood

Andy Driscoll - Sunzen Interact

Try our fun twist on the classic game, play Yangman now!!!
http://www.sunzen.com/hangman/hangman.html


[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to