| **Navigation:**  [[abc library reference.htm|ABC Library Reference]] > WindowManager > WindowManager Methods >====== SetResponse (OK or Cancel the window) {{c6h0009.jpg|C6H0009.jpg}} ====== | [[setalerts alert window control keystrokes .htm|{{btn_prev_n.gif|Previous page}}]][[abc library reference.htm|{{btn_home_n.gif|Return to chapter overview}}]][[takeaccepted a virtual to process event accepted windowmanager .htm|{{btn_next_n.gif|Next page}}]] | | || **SetResponse( **//response //**), VIRTUAL** {{blk2blue.jpg|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 database request .htm|Request]], [[response response to database request .htm|Response]]