Programming Guide



sm_ferr_reset

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 to NULL.

Description

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.

Window versus Status Line Display

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 to WHEN_REQUIRED (the default), character-mode Panther displays messages on the status line except when these conditions occur:

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 flag sm_do_not_display.

Message Acknowledgment

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").

See Also

sm_femsg, sm_fqui_msg, sm_fquiet_err