I have some questions about DIALOGs that I probably should have asked some time ago, and maybe just shows that I don't quite understand, but here goes:
OK I have DIALOGS (objects of class TDialog) which I create programmatically. In other words my code looks something like this:
- Code: Select all Expand view
DEFINE DIALOG dlgPATIENT TITLE sTitle SIZE 950, 650
@ 3, 1 SAY "Key" OF dlgPATIENT SIZE 90, 25
// rest of definition
@ 60, 51 BUTTON btnQUIT PROMPT "Quit" ACTION ( ::cExitCode := "Q", dlgPATIENT:End() ) OF dlgPATIENT
ACTIVATE DIALOG dlgPATIENT CENTERED
So dlgPATIENT points to an object of class TDialog. I want to use that TDialog object many times. But it seems that dlgPATIENT:End() partly destroys it, because if I try to reuse it later with:
- Code: Select all Expand view
ACTIVATE DIALOG dlgPATIENT CENTERED
The screen will often come up the second time but not properly and is completely skew wiff by the third time.
I assume I have to call dlgPATIENT:End() to stop its message loop. Is that correct? Is there some other way?
Is anyone out there reusing their DIALOGs in such a manner or do you go through your code that creates them (DEFINE DIALOG) each time you need to use them.
Thanks
xProgrammer