Introduction

Language Structure

IB Statements

File System

Comet 32 Runtime

Index

(SatisfyInput)

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:

  1. display a Comet hyperlink
  2. set an eventsub trap
  3. go to the main processing section of your program, which includes an INPUT statement
  4. in the eventsub routine, use the (SatisfyInput) mnemonic to assign input data that will be fed to the INPUT statement when someone clicks on a hyperlink

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