| **Navigation:**  [[templates.htm|Templates]] > Guide to all Templates > General Topics >====== Clarion templates - Request and Response ====== | [[template guide quick reference.htm|{{btn_prev_n.gif|Previous page}}]][[templates.htm|{{btn_home_n.gif|Return to chapter overview}}]][[refresh window routine.htm|{{btn_next_n.gif|Next page}}]] | | || Clarion ships with two distinct Template sets, the original "Clarion" templates, and the "ABC" Templates. The "Clarion set of templates generates a very easy to read and use Procedural application. The "ABC" set of templates (also very easy to use) generates a class based application, hence the name ABC is short for "Application Builder Classes". The "Clarion templates" use a //Request and Response// system. This system maintains the integrity of inter-procedure communications.\\ There are three components to the Request and Response system: | **Global Variables:** | **GlobalRequest** and **GlobalResponse**. In GENERATED code, there are no points between the place that either variable is assigned a value and the place the value is interpreted. These variables are defined as:GlobalRequest      LONG,THREADGlobalResponse   LONG,THREAD | {{notebox.jpg|NoteBox.jpg}} If you are creating an application that consists of more than one generated DLL, you must check the "Generate Internal Global Data as EXTERNAL" check box for all DLLs except one. Likewise, you must check the "Generate Internal Global Data as EXTERNAL" check box for each APP creating an .EXE.\\ | **Local Variables:** | ThisWindow.Request (or SELF.Request), ThisWindow.Response (or SELF.Response), ThisWindow.OriginalRequest (or SELF.OriginalRequest). | | | ThisWindow.Request (or SELF.Request) and ThisWindow.OriginalRequest (or SELF.OriginalRequest) are assigned value immediately after the procedure begins. | | | ThisWindow.Response (or SELF.Response) is assigned a value before a bit of code signals the exit of the procedure. Right before the procedure terminates, GlobalResponse is assigned the value of ThisWindow.Response (or SELF.Response). | | **Enumerated EQUATEs:** | These are primarily to increase readability of the code. The actual numbers themselves are inconsequential, with one exception; Request values less than 0 are reserved for use in multi-page systems. | | | InsertRecord | EQUATE (1) | ! Add a record to table | | | ChangeRecord | EQUATE (2) | ! Change the current record | | | DeleteRecord | EQUATE (3) | ! Delete the current record | | | SelectRecord | EQUATE (4) | ! Select the current record | | | ProcessRecord | EQUATE (5) | ! Process the current record | | | ViewRecord | EQUATE (6) | ! View the current record | | | SaveRecord | EQUATE (7) | ! Save the current record | | | | | | | | RequestCompleted | EQUATE (1) | ! Update Completed | | | RequestCancelled | EQUATE (2) | ! Update Aborted |