| Parameter | Description |
|---|---|
| hMsg | Message handle of the callback message. |
| sOptArg1 | (Optional) Parameter passed back to the callback message. |
| sOptArg2 | (Optional) Parameter passed back to the callback message. |
| sOptArg3 | (Optional) Parameter passed back to the callback message. |
| sOptArg4 | (Optional) Parameter passed back to the callback message. |
| sOptArg5 | (Optional) Parameter passed back to the callback message. |
| sOptArg6 | (Optional) Parameter passed back to the callback message. |
| sOptArg7 | (Optional) Parameter passed back to the callback message. |
| sOptArg8 | (Optional) Parameter passed back to the callback message. |
| sOptArg9 | (Optional) Parameter passed back to the callback message. |
| sOptArg10 | (Optional) Parameter passed back to the callback message. |
Procedure CallBack Handle hMsg String sOptArg1 String sOptArg2 String sOptArg3 String sOptArg4 String sOptArg5 String sOptArg6 String sOptArg7 String sOptArg8 String sOptArg9 String sOptArg10
| Call: | Send CallBack hMsg sOptArg1 sOptArg2 sOptArg3 sOptArg4 sOptArg5 sOptArg6 sOptArg7 sOptArg8 sOptArg9 sOptArg10 |
Use this procedure to delay a task to a new server next round-trip. This has the advantage that the user interface (UI) will be updated and it will potentially get around timeout issues. You would use this when performing longer running processes.
The message handle passed as the first argument will be called in a new round-trip. This message does need to be published using WebPublishProcedure and should be available on this web object. Up to 10 optional parameters can be passed that will be passed back to the callback message.
This example shows how the callback system can be used to break up a process into multiple calls updating the user interface on each step.
Object oProgressBar is a cWebProgressBar
Set piColumnSpan to 7
End_Object
Object oProcessCustomer is a cWebButton
Set piColumnSpan to 3
Set psCaption to "Process"
Set piColumnIndex to 7
Procedure DoProcessCustomers Integer iProgress
// Here you would do the actual work
Sleep 2
Increment iProgress
WebSet piValue of oProgressBar to (iProgress * 10)
If (iProgress < 10) Begin
Send CallBack (RefProc(DoProcessCustomers)) iProgress
End
End_Procedure
WebPublishProcedure DoProcessCustomers
Procedure OnClick
Send CallBack (RefProc(DoProcessCustomers)) 0
End_Procedure
End_Object