Programming Guide |
Displays an error message and awaits user acknowledgement
void sm_ferr_reset(int msg_num, char *message);
msg_num
- A Panther message number. If you supply a string value for
message
, Panther ignores this parameter.message
- The error message to display. To use the
msg_num-
specified message, set this parameter toNULL
.
sm_ferr_reset
displays the specified message either on the status line or in a popup window and awaits user acknowledgement. This function also calls the error event function if one is installed.
By default, GUI versions of Panther always display messages in a popup window with an OK button. Character-mode Panther always displays messages in a window only if the configuration variable MESSAGE_WINDOW is set to
ALWAYS
. If you set this variable toWHEN_REQUIRED
(the default), character-mode Panther displays messages on the status line except when these conditions occur:
- The message overflows the status line. Note that Panther prevents the message from overlapping the cursor row/column display, if it is turned on.
- The message wraps to multiple lines.
- You specify window display with the %W format option.
Note: You can force display of a message to the status line on all GUI and character-mode platforms, regardless of MESSAGE_WINDOW
's
setting, if the message contains the%Mu
option, or the behavior variable ER_KEYUSE is set toER_USE
.
sm_ferr_reset
and sm_femsg function identically when messages are displayed in a window. If the message is displayed on the status line,sm_ferr_reset
forces the cursor on at the current field and forces off global flagsm_do_not_display.
Users can dismiss the error message by pressing the acknowledgement key. In a window-displayed message, OK and space bar also serve to dismiss the error message. The acknowledgement key—by default, space bar—can be set through the behavior variable ER_ACK_KEY. If the user acknowledges the message through the keyboard, Panther discards the key. You can modify this behavior for individual messages through the
%Mu
option (described under sm_femsg).Several behavior variables determine default message presentation and behavior. For more information about these variables, refer to Chapter 2, "Application Variables," in Configuration Guide. You can change these defaults at runtime through sm_option.
You can also change message behavior and appearance for individual messages through percent escapes embedded in the message text (described under "Message Appearance and Behavior").
sm_femsg, sm_fqui_msg, sm_fquiet_err