J
jbijker
Guest
First your main program needs to subscribe to your event: SUBSCRIBE TO "myStatus" IN THIS-PROCEDURE. Then you run your logic that takes a while to execute. Inside this logic there must be lots of PUBLISH statements. PUBLISH "myStatus" (INPUT mytotal, myrunningcount). When the processing is complete you need to unsubscribe. UNSUBSCRIBE TO "myStatus" IN THIS-PROCEDURE. You also need to have a procedure called myStatus with 2 input parameters which does the actual status bar update. PROCEDURE myStatus: DEFINE INPUT PARAMETER ipimyTotal AS INTEGER NO-UNDO. DEFINE INPUT PARAMETER ipimyrunningcount AS INTEGER NO-UNDO. /* update the status bar */ END PROCEDURE. So in the end when the bulk processing gets done it will publish a lot of myStatus events. Since you've subscribed to the events it will run your local procedure whenever it happens, and in here you do the magic to update your status bar.
Continue reading...
Continue reading...