Navigation: ABC Library Reference > WindowManager > WindowManager Methods >====== SetResponse (OK or Cancel the window) ====== | ![]() ![]() |
SetResponse( **//response //), VIRTUAL**
| 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**





