General Component

Fnd_Gen_GetDatabaseInfo

Fnd_Gen_GetDatabaseInfo (info type) -> Text

Legacy manual page 115

Parameters

ParameterTypeDescription
info typeTextInfo type label
Function resultTextValue

Description

4D’s component architecture does not allow variables to be shared between components. That is a good thing, but it requires us to find another way to share information between components. In Foundation, we do this with the Fnd_Gen_SetDatabaseInfo and Fnd_Gen_GetDatabaseInfo methods. Foundation maintains a set of text arrays to store general information about the shell. Information is added to these arrays using the Fnd_Gen_SetDatabaseInfo method, and you can get at this information using the Fnd_Gen_GetDatabaseInfo method. By default, Foundation’s General component stores just one bit of information: the version number of the Fnd_Gen component. In the Foundation Shell, the Fnd_Hook_Shell_Setup hook uses the Fnd_Gen_SetDatabaseInfo method to set up four other pieces of information:

Label Data DatabaseName The name of the database DatabaseVersion The version number of the database DatabaseCopyright The database’s copyright information DatabaseURL The URL for the About dialog You can store any text information in these variables that you need to share between components. These routines are designed for storing hard-coded text strings for communication between components. To store user preference related text strings, use Foundation’s Preferences component.

Extracted source text
            Fnd_Gen_GetDatabaseInfo (info type) ➔ Text

              Parameter                  Type                    Description
              info type                  Text                    Info type label
              Function result            Text                    Value

            4D’s component architecture does not allow variables to be shared between components. That is a good
            thing, but it requires us to find another way to share information between components. In Foundation,
            we do this with the Fnd_Gen_SetDatabaseInfo and Fnd_Gen_GetDatabaseInfo methods.
            Foundation maintains a set of text arrays to store general information about the shell. Information
            is added to these arrays using the Fnd_Gen_SetDatabaseInfo method, and you can get at this
            information using the Fnd_Gen_GetDatabaseInfo method.
            By default, Foundation’s General component stores just one bit of information: the version number of the
            Fnd_Gen component.
            In the Foundation Shell, the Fnd_Hook_Shell_Setup hook uses the Fnd_Gen_SetDatabaseInfo
            method to set up four other pieces of information:

              Label                      Data
              DatabaseName               The name of the database
              DatabaseVersion            The version number of the database
              DatabaseCopyright          The database’s copyright information
              DatabaseURL                The URL for the About dialog
            You can store any text information in these variables that you need to share between components. These
            routines are designed for storing hard-coded text strings for communication between components. To
            store user preference related text strings, use Foundation’s Preferences component.