DialogWindow:ExecModal

Normally a dialog window will cause program execution to pause when the window is shown and then continue once the window is closed. The default behavior of ExecModal( ) maintains the expected behavior.

However the programmer can create a new class which inherits from DialogWindow and implement a new ExecModal() method so as to change this behavior.

Examples

As an example the programmer could use the following version which performs no action:

METHOD ExecModal() CLASS DialogWindow
    RETURN NIL

Now the program control comes back immediately after calling the Show() method. This is very useful for cases where your code wants to control the windows dispatcher loop with the function ApplicationExec(EXECWHILEEVENT):


Method xyz() class xyz
    Local oPDlg as ProgressDialog // inherit from DialogWindow
 
    oPDlg := ProgressDialog{SELF, "Processing is going on!"}
    oPDlg:Count := oServer:Reccount
    oPDlg:Show()
 
    //ProgressDialog is modal, the user can do
 // nothing during the processing other than what
    // your code permits.
    //In this example you can abort the loop.
 
    oServer:GoTop()
 
    do while oServer:Eof
        IF ! oPDlg:Step()  //FALSE if abort button is pressed

            exit
        endif
        //do something
        oServer:Skip()
    enddo
 
    oPDlg:EndDialog()

Commentaar van anderen:
nike air max 90 op 25-8-2010 om 10:33
supra skytop shoes mbt shoes on sale solar charger Wedding dress
Geef feedback:

CAPTCHA image
Vul de bovenstaande code hieronder in
Verzend Commentaar