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

GSTAENR Record
GSTACRE Creation
GSTAANU Cancellation 
GSTAFIN Cancel
GSTACHG Code change
GSTASUI Next
GSTAPRE Previous
GSTAFIR First record
GSTALAS Last record
GSTALFT Simple click in left list
GSTALF2 Double click in left list
GSTALF3 Simple click in the hierarchical list
GSTALF4 Double click in the hierarchical list
GSTARET Enter
GSTANEW File/New
GSTASEL File/Select
GSTACOM File/Comment
GSTAEDI Printing
GSTALIS List
GSTAJOI Attachments
GSTAHLP Help
GSTAESC Abort (by closing the window)
GSTAOK OK button
GSTAPCK Picking selection in GEODE
GSTADAT Property
>=GSTABOU Special 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).
>=GSTABOU2 Special 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