APRES_CHOI

Description

This action is called before executing an action (button, menu, left list, etc.) ). A status that defines the action is sent by the supervisor in the RESPONSE variable.

OBJect type

Simple, Grid, Combined

Transaction

No

Use

It is possible to short-circuit the normal pocessing of a button, menu, etc.: This action is used to launch its own processing instead of the template processing, then to put RESPONSE back to 0.

The various possible values for the RESPONSE variable are given by global variables, whose names are given in the grid below:

Status

Corresponding button

GSTAENRRecord
GSTACRECreation
GSTAANUCancellation 
GSTAFINCancel
GSTACHGCode change
GSTASUINext
GSTAPREPrevious
GSTAFIRFirst record
GSTALASLast record
GSTALFTSimple click in left list
GSTALF2Double click in left list
GSTALF3Simple click in the hierarchical list
GSTALF4Double click in the hierarchical list
GSTARETEnter
GSTANEWFile/New
GSTASELFile/Select
GSTACOMFile/Comment
GSTAEDIPrinting
GSTALISList
GSTAJOIAttachments
GSTAHLPHelp
GSTAESCAbort (by closing the window)
GSTAOKOK button
GSTAPCKPicking selection in GEODE
GSTADATProperty
>=GSTABOUSpecial button defined by a figure (checks are performed on the fields of the page beyond the field being entered, and the proceedings are blocked if a check is not satisfactorily completed).
>=GSTABOU2Special button defined by a lower-case letter (the page is not checked before the function is launched).
For instance: SUBADI   management of miscellaneous tables

The management of the miscellaneous tables is a grid management. The radio buttons are not managed here. Therefore specific processes have been programmed for these radio buttons in order to enable the user to display the next, previous, first or last table.

$APRES_CHOI
Case REPONSE
When GSTASUI: Gosub SUIVANT: REPONSE = 0
When GSTAPR : Gosub PRECEDENT: REPONSE = 0
When GSTAPR: Gosub PREMIER: REPONSE = 0
When GSTAPR: Gosub DERNIER: REPONSE = 0
Endcase
Return

$SUIVANT
If VERROU: Gosub DEVERROU From GOBJET: Endif
   Read [ADV]CODE > [M]NUMTAB
   If fstat>2
      GMESSAGE = mess(11,100,1): GERR = 1: Return
   Else
      [M]NUMTAB = [F:ADV]NUMTAB
      CLE2 = num$([M]NUMTAB
   Gosub RELIT From GOBJSUB
   Endif
Endif
Return