User Tools

Site Tools


setresponse_ok_or_cancel_the_window_.htm
Navigation:  ABC Library Reference > WindowManager > WindowManager Methods >====== SetResponse (OK or Cancel the window) C6H0009.jpg ====== Previous pageReturn to chapter overviewNext page

SetResponse( response ), VIRTUAL

blk2blue.jpg

SetResponse Initiates standard “OK” or “Cancel” processing.
Response An integer constant, variable, EQUATE, or expression indicating the WindowManager's response (OK or Cancel) to the requested operation.

The SetResponse method initiates standard “OK” or “Cancel” processing for the procedure. That is, it registers the procedure's result (completed or cancelled) and triggers the normal procedure shut down.

Implementation:

The TakeAccepted method calls the SetResponse method. SetResponse sets the Response property and POSTs an EVENT:CloseWindow. If the response is RequestCancelled, SetResponse also sets the VCRRequest property to VCR:None.

EQUATEs for the response parameter are declared in \LIBSRC\TPLEQU.CLW. as follows:

RequestCompleted  EQUATE (1)  !Update Completed

RequestCancelled  EQUATE (2)  !Update Aborted

Example:

WindowManager.TakeAccepted PROCEDURE

I LONG,AUTO

A SIGNED,AUTO

CODE

A = ACCEPTED()

!procedure code

LOOP I = 1 TO RECORDS(SELF.Buttons)

 GET(SELF.Buttons,I)

 IF SELF.Buttons.Control = A

  SELF.SetResponse(SELF.Buttons.Action)

  RETURN Level:Notify

 END

END

!procedure code

RETURN Level:Benign

See Also:     Request, Response

setresponse_ok_or_cancel_the_window_.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1