company logo

BaseContext :: decision - Get user decision

The function allows prompting a command line input or a message box in order to let the user make decisions. The question for the decision should be defined in an error message (project resource in the resource database). The error message will be identified by the number passed to the decision.

When no message number is passed ( 0 ), the decision question is constructed from up to three message parameter strings passed to the function.

For predefined messages, the parameters passed are used for replacing message variables defined in the message.

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

Notes:

not yet working

Return value:  Reply button type ( odaba::ButtonTypes  )

The reply button type is one of the buttons that have been displayed in a decision box.

Implementation details

odaba::ButtonTypes BaseContext  :: decision ( int32 iMessageNumber, int32 iReplyButtons, odaba::ButtonTypes eDefaultButton, odaba::String &sParameter1, odaba::String &sParameter2, odaba::String &sParameter3 )

The function displays a decision message with reply combination requested in the eReplyButtons parameter. One of the reply buttons passed in eDefaultButton can be set as default button.

  • iMessageNumber - Message number

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

  • iReplyButtons - Reply buttons

    The value is a combination of any number of the buttons defined in Button types.

      int    iReplyButtons = 0;

      iReplyButtons |= Ok;

      iReplyButtons |= Cancel;

      iReplyButtons |= Retry;

  • eDefaultButton - Default button

    The default button type refers to one of the buttons defined as reply buttons.

  • sParameter1 - String parameter
  • sParameter2 - String parameter
  • sParameter3 - String parameter