? TAB(-10,AG_DELAYOP); opcode, delayms, ctlid; tab(-1,127);
The function AG_DELAYOP (107) allows application to request a delayed operation to be performed in background. Currently this only works for deleting a control, but the range of possibilities may be expanded later.
Parameters
opcode
is the operation code. Currently only CTLOP_DEL (3) is supported.
delayms
is the number of milliseconds to wait before performing the operation.
ctlid
is the id (name or number) of the control to delete.
Comments
If delayms and ctlid are omitted, and a prior delayed operation request is still pending, it will force the operation to take place immediately.
The motivation behind providing this command was mainly to allow applications to create status message panels that go away by themselves after the specified interval. This provides more feedback to the user, without requiring any action on the user's part to acknowledge it, or on the application's part to remove it, or forcing the application to pause to allow the user to read it.
For example, if the user gives the command to post some transactions, the application may want to display a confirmation message "Posting..." that appears for just a couple of seconds and then goes away.
In addition to the command, a wrapper procedure, StsMsgBox() is included in the [907,12] directory of the SOSLIB which facilitates such messages, capitalizing on the new capability if available, and simulating it earlier versions.