Problem: the text gadget is not updated while loading. The text "Loading..." does not appear. I can add a WindowEvent() after settext but my procedure is binded and WindowEvent() is not allowed. Any hints?
Make your x() procedure handle different parts in stages (using Select/Case to process each possible stage) with all but the first stage handled and signaled by using PostEvent() at the end of each stage (whenever you need a screen update). You can keep track of process in a structure you create in the procedure and include its address as part of the next stage's event data.
You would bind each of the sub events to the same procedure.