company logo

BaseContext :: message - Display message

The function displays a message constructed from a message resource or from the text passed to the function. Depending on the environment, the message is shown on a console, in an output area of an GUI application or in a message box.

When the context handle does not refer to a valid context instance the function throws an exception.

In case of decision messages, the function returns true, when the answer is OK and false otherwise (NO, Cancel).

Return value:  Success ( bool  )

The value is true when the function was executed successfully. Otherwise the value is set to false.

Implementation overview

Implementation details

  1. Display message for last error
    bool BaseContext  :: message (  )

    When an error has been set, the function displays text and additional information for the last error. When no error is set, nothing will be displayed.

  2. to list
  3. Display message for message resource
    bool BaseContext  :: message ( int32 iMessageNumber, odaba::String &sParameter1, odaba::String &sParameter2, odaba::String &sParameter3 )

    In order to provide extended message support as multilingual messages or message explanations, message resources can be defined in an error class of a project. Message resources are identified by a message number (iMessageNumber) and may contain placeholders for message variables, which will be replaced by sParamater1, sParamater2 and sParamater3.

    • iMessageNumber - Message number

      The message number passed refers be an error/message definition the resource database.

    • sParameter1 - String parameter
    • sParameter2 - String parameter
    • sParameter3 - String parameter
  4. to list
  5. Display message text
    bool BaseContext  :: message ( odaba::String &sString )

    The text as being passed to the function (sString) will be displayed in the message (output) area.

    • sString - String value
  6. to list
  7. Display message text with title
    bool BaseContext  :: message ( odaba::String &sString, odaba::String &sTitle, odaba::MessageTypes eMessageTypes )

    The text as being passed to the function (sString) will be displayed in the message box or output area. In case of question or decision messages, the function returns true, when the OK button has clicked.

    • sString - String value
    • sTitle - - internal feature (not documented)
    • eMessageTypes - - internal feature (not documented)
  8. to list