Programming Guide



FORCE_CLOSE

Unconditionally discards the changes to the screen

int sm_tm_command ("FORCE_CLOSE [ tableViewName [ tableViewScope ] ]");

Arguments

tableViewName
The name of a table view in the current transaction. This parameter is case sensitive.

If tableViewName is specified, the command is applied according to the tableViewScope parameter. Since the entire table view tree might not be included, this is known as a partial command, and sm_tm_command sets TM_FULL to 0.

If tableViewName is not specified, the command is applied for each table/server view, starting with the root table view. This is known as a full command, and sm_tm_command sets TM_FULL to 1.

tableViewScope
One of the following parameters, which must be preceded by a table view name.

Description

FORCE_CLOSE unconditionally discards the changes to the screen without a query message. If a table view is not specified, it sets the transaction mode to initial.

Push buttons and menu selections for the FORCE_CLOSE command can choose to set the class property to close_button. By default, close_button is active in all but initial mode.

Sequence

The FORCE_CLOSE command is useful after SELECT, NEW or COPY in order to discard changes.

Events

The following requests can be generated by the FORCE_CLOSE command to discard changes that have been made to the screen.

Table 8-22 Request events for FORCE_CLOSE

Request

Traversal

Typical Processing

TM_PRE_CLOSE

By table/server view from the specified table view

SAVE/CLOSE processing is beginning. Identical processing is performed for TM_PRE_SAVE.

TM_DISCARD

By table/server view from the specified table view

Sets a discard flag, consulted by TM_POST_SAVE1.

TM_POST_CLOSE

By table/server view from the specified table view

Generates event slices:

TM_POST_CLOSE, TM_POST_SAVE1, TM_POST_SAVE2

For some engines, the processing in TM_POST_SAVE1 can suggest a change to initial mode at the end of this request.

Table 8-23 Table 22. Slice event processing for the FORCE_CLOSE command.

Table 8-24 Slice event processing for FORCE_CLOSE

Slices Typical Processing

TM_POST_CLOSE

Processing is identical to that of TM_POST_SAVE described under SAVE, but no save cursor exists.

TM_POST_SAVE1

Described under SAVE, but no save cursor exists.

TM_POST_SAVE2

Described under SAVE.