company logo

GUIBaseContext :: doBeforeCancelClose - Pre-event handler for CancelClose action

The handler handles the DEV_CancelClose data event in a CancelClose action. When the event is fired, the property handle is still opened and data can be accessed. The event must be handled, when data for the control needs to be reset before closing the control and its data source. The event is typically used to close (roll back) transactions in a transaction-save dialog.

The event handler may prevent the dialogue or application from being closed by returning true, in which case data is not canceled and the control remains opened.

The handler should return one of the following values:

  • -1 (not handled) - the event handler will be removed from the handler list and is not called anymore.
  • 1 (refuse) - Requested action will not be executed.
  • 0 (ok) - Action is permitted to be executed.

Implementation details

int32 GUIBaseContext  :: doBeforeCancelClose (  )