I have a form with a button to call the progressive lookup dialog by Jim Chapman. The beginning of the script on the push button has a command to close the first form (:PersonInfoDisplay.close()) which was opened as a sysem-default modeless form. However it appears the form does not close before the information from the lookup dialog is passed back to it. I tried to create space and time for the form to close by using first - xbasic_wait_for_idle() - and then - sleep(5/10) (up to 5 seconds) - but to no avail. Here is the trace window events list (partialz):
You can see that the "OnPush" event of the btnLkupPerson button is on the first instance of the form - :PersonInfoDisplay. Then the second instance fires before the first instance has finally completed the "On Exit".
If I go through this cycle again the :PersonInfoDisplay0 instance of the form will fire the lookup form and eventually finish as :PersonInfoDisplay.
I'm not sure if this is important or whether it is the source of another issue I'm dealing with. But how do you actually close the first form before the information from the lookup fires up the second instance.
I also tried not closing the first form, but with each push of the btnLkupPerson it opens up a new instance of the form.
Thanks for your help.
Les
Code:
:PersonInfoDisplay:btnLkupPerson "OnArrive" :PersonInfoDisplay:btnLkupPerson "OnPush" :PersonInfoDisplay0:brAddress "OnInit" :PersonInfoDisplay0 "OnInit" :PersonInfoDisplay0 "OnFetch" :PersonInfoDisplay0 "CanChange" :PersonInfoDisplay0:brAddress "CanArrive" :PersonInfoDisplay "OnDeactivate" :PersonInfoDisplay0:brAddress "OnFetch" :PersonInfoDisplay0:brAddress "CanArrive" :PersonInfoDisplay0:brAddress "OnArrive" :PersonInfoDisplay0 "OnActivate" :PersonInfoDisplay "CanExit" :PersonInfoDisplay:btnLkupPerson "CanDepart" :PersonInfoDisplay:btnLkupPerson "OnDepart" :PersonInfoDisplay "OnExit" :PersonInfoDisplay0:btnDisplayCorps "OnFlyover" :PersonInfoDisplay0:btnDisplayCorps "OnFlyoverLeave" :PersonInfoDisplay0:btnDisplayPhones "OnFlyover" :PersonInfoDisplay0:btnDisplayPhones "OnFlyoverLeave" :PersonInfoDisplay0:btnClose "OnFlyover" :PersonInfoDisplay0:btnClose "CanArrive" :PersonInfoDisplay0:brAddress "CanDepart" :PersonInfoDisplay0:brAddress "OnDepart"
If I go through this cycle again the :PersonInfoDisplay0 instance of the form will fire the lookup form and eventually finish as :PersonInfoDisplay.
I'm not sure if this is important or whether it is the source of another issue I'm dealing with. But how do you actually close the first form before the information from the lookup fires up the second instance.
I also tried not closing the first form, but with each push of the btnLkupPerson it opens up a new instance of the form.
Thanks for your help.
Les