IOCancelMode Method (WINDOW)
9.2C, PLBCMP GUI Only
The IOCancelMode method specifies that a Window close action on a WINDOW object aborts a FILE, AFILE, or IFILE READ instruction that is active. The Window close action can occur when the end-user uses the Window title bar close button or if the end-user closes the MAINWINDOW using the 'File\Exit' menu selection. The method uses the following format:
|
|
|
|
Where:
label
Optional. A Program Execution Label.
object
Required. A WINDOW object that is accessed.
return
Optional. A Numeric Variable that is always zero.
value
Required. A Numeric Variable or decimal value as described below.
Flags Affected: OVER, ZERO
Note the following:
The ZERO flag is set when the {return} value is zero.
The OVER flag is set if the value returned is too large to be stored into the {return} variable.
If the {value} is a zero, the WINDOW object is reset to not cancel an IO read on a close Window action. If the {value} is non-zero, the WINDOW object is set to cancel an IO read on a Window close action.
The IoCancelMode for a WINDOW only takes affect when the $EventClose for the WINDOW object is registered. This behavior is implemented to prevent any accidental cancel operations for IO.
The IoCancelMode for the MAINWINDOW always takes affect when a Window close action is invoked. The close action for the MAINWINDOW does not depend on the registration of the close event.
See Also: Method Syntax, WINDOW Methods
![]() |