Introduction | Language Structure | IB Statements | File System | Comet 32 Runtime | Index |
| Mnemonic: | (SatisfyInput=data$) |
| Discussion: |
Typically, your program will be positioned at an INPUT statement when the user clicks on a hyperlink. When the event handling subroutine concludes, it returns to the same INPUT statement (assuming that you've concluded the subroutine with a RETURN statement).
The (SatisfyInput) mnemonic provides a way for the event handling subroutine to supply input data to the original INPUT statement. Here's an outline of the process:
Thus, when the user clicks on the hyperlink, the program will branch to the event handing subroutine, where it will provide the input data to the original data entry field. This is a perfect solution |
| Example: |
Print @(40,3);"Run your favorite utility program" Print @(40,4);(Hyperlink="Spooler","LINK7",1) Print @(40,5);(Hyperlink="Comet Editor","LINK8",1) Print @(40,6);(Hyperlink="Utility menu","LINK9",1) ! set EVENTSUB trap EVENTSUB GetEvent,Event$,Source$ ! MainLineProcessing Input @(34,20),Program$ ProgEnd: if (Program$ EQ "") Then_ Program$ = "QMONITOR" Print (WC);(BF) Run Program$ ! = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = ! ! E V E N T P R O C E S S I N G S U B R O U T I N E ! ! = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = GetEvent: Print (WC);(BF) ! make processing decisions based on the value of the EventString$ Select Case Event$ . . . Case "LINK7" TempProg$ = "QSPOOL" Case "LINK8" TempProg$ = "CED" Case "LINK9" TempProg$ = "QTILITY" . . . Endselect ! Pass result back to main-line program and exit input If (TempProg$ NE "") Print (SatisfyInput = TempProg$) EndIf ! re-set Eventsub trap EVENTSUB GetEvent,Event$,Source$ RETURN |