This is the expected behavior. Blocks run on what is called the user interface (UI) thread. Therefore, no user interaction can occur within a stack of blocks, so the dialog doesn't actually appear until after the button event code completes. The ShowChooseDialog block shows the choose dialog, but it cannot pause execution due to the asynchronous nature of user interface programming. When the user clicks a button in the dialog, the AfterChoosing event is run to report the result back to your app, so anything you want to happen after the dialog should go there.
Thanks for your explanation. I understood the flow now.
I learnt a little bit VB long time ago. I thought their dialog block allows pause execuation. Let user to make decision before execuate the rest of code. If I am wrong, please let me know.
Does MIT has similar dialog box and pause execution? Anyway, this is not critical as I put sub procedure into AfterChoosing event. However, it would be great if MIT has such dialog box.
Yes, if you get your workflow correct (by which I mean you do not execute anything until after choosing), the Notifier Choose dialog will stop execution until the user has made a choice
TImAI2. I afraid ShowChooseDialog won’t pause execuation. I tried and ewpatton explained the asynchronous nature.
Taifun. Thanks for the concept why wait procedure generally a bad idea. You gave me a lot of good information. However, my knowledge is limited. In the artical, did it describe using timer, delay the action and allow us to get enough time to press button to change the value of variables?
Can I please ask a related question? Will the "showChooseDialog" disable other user interactions while it is open? It looks like it from my trials, but I would like to be sure. In my case I have two buttons on the screen. Clicking on one of these will bring up the "showChooseDialog" and it would not be good if the user could click on the other button (or repeatedly click on the same button) while this dialog is open. I just ask because if these are not accessible for the user while the dialog is open, then I do not have to do anything, but if these are accessible, I need to disable them while the dialog is open.