Function called by relation event after selecting the gallery.


PUBLIC FUNCTION dlgEvent__action_action_AfterGallery( 
   dlg ui.DIALOG, errNo INTEGER, errMsg STRING, photoPath STRING )

The action part of the function name is defined by the Action property of the relation (under Source UI Settings) . If the Action property is not set, an error will occur at compile time.

The function has four parameters:

  1. dlg. This is a ui.DIALOG object referencing the current dialog. The dialog can implement an INPUT, INPUT ARRAY, DISPLAY ARRAY, MENU, or CONSTRUCT. For more information, see The Dialog class in Genero Business Development Language User Guide.
  2. errNo. This is an SQLCA.SQLCODE error.
  3. errMsg. This is the SQLERRMESSAGE message.
  4. photoPath. This is the path where the photos in the gallery are stored.


When you select the After Selecting Gallery property for the creation of the event, a function shell is created. Enter your code in the function.

This function is when a gallery is selected.

Example: After Selecting Gallery

This example uses the After Selecting Gallery code event on a relation. The Action property of the relation is set to select. Every time a user selects a gallery, a message is displayed.

PUBLIC FUNCTION dlgEvent__action_select_AfterGallery(dlg ui.DIALOG, errNo INTEGER, errMsg STRING, photoPath STRING)

        DISPLAY "Gallery selected: " || photoPath 
        DISPLAY "ERROR: [" || errNo || "] " || errMsg
    END IF