gwa.app.getVersion()

Returns the application version set by gwabuildtool --app-version.

Syntax

FUNCTION getVersion() RETURNS STRING

Returns the application version.

Usage

Use the gwa.app.getVersion() method to return the version set in gwabuildtool with the --app-version option. If this option was not set, it returns NULL.

For a complete example, run the GWA "update" demo in your GWA installation directory. If installed in FGLDIR, you will find the demo in $FGLDIR/demo/update or if installed in a separate directory, you will find it in gwa-install-dir/demo/update.

In this example, the action "app" displays the GWA app version to the message field:
IMPORT FGL gwa.location

FUNCTION menu_gwa_info()

  MENU "GWA info"
    ON ACTION app ATTRIBUTES(TEXT="App ver", COMMENT="Shows the app's version")
           MESSAGE SFMT("App version: %1",gwa.app.getVersion())
    ON ACTION cancel ATTRIBUTES(TEXT="Back")
      EXIT MENU
  END MENU

END FUNCTION