<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://wiki.signature.net/skins/common/feed.css?270"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://wiki.signature.net/index.php?action=history&amp;feed=atom&amp;title=IB_Statements%2Feventsub</id>
		<title>IB Statements/eventsub - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.signature.net/index.php?action=history&amp;feed=atom&amp;title=IB_Statements%2Feventsub"/>
		<link rel="alternate" type="text/html" href="http://wiki.signature.net/index.php?title=IB_Statements/eventsub&amp;action=history"/>
		<updated>2026-05-04T20:38:36Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.16.0</generator>

	<entry>
		<id>http://wiki.signature.net/index.php?title=IB_Statements/eventsub&amp;diff=2843&amp;oldid=prev</id>
		<title>Jim: minor</title>
		<link rel="alternate" type="text/html" href="http://wiki.signature.net/index.php?title=IB_Statements/eventsub&amp;diff=2843&amp;oldid=prev"/>
				<updated>2010-06-04T18:20:48Z</updated>
		
		<summary type="html">&lt;p&gt;minor&lt;/p&gt;
&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 18:20, 4 June 2010&lt;/td&gt;
		&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 14:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 14:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''Discussion:'''&amp;nbsp; The EVENTSUB statement defines an event handling subroutine. Such a routine provides a way for your program to determine what to do when an event occurs. &amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''Discussion:'''&amp;nbsp; The EVENTSUB statement defines an event handling subroutine. Such a routine provides a way for your program to determine what to do when an event occurs. &amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;For example, an event occurs when the user clicks on the Comet hyperlink. For a detailed discussion of this topic, see '''[[Comet &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;hyperlinks&lt;/del&gt;]]'''. &amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;For example, an event occurs when the user clicks on the Comet hyperlink. For a detailed discussion of this topic, see '''[[Comet &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Hyperlinks&lt;/ins&gt;]]'''. &amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''Note:''' To remove an eventsub trap, issue the statement without parameters, as follows: &amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''Note:''' To remove an eventsub trap, issue the statement without parameters, as follows: &amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key wikidb:diff:version:1.11a:oldid:2842:newid:2843 --&gt;
&lt;/table&gt;</summary>
		<author><name>Jim</name></author>	</entry>

	<entry>
		<id>http://wiki.signature.net/index.php?title=IB_Statements/eventsub&amp;diff=2842&amp;oldid=prev</id>
		<title>Jim: minor</title>
		<link rel="alternate" type="text/html" href="http://wiki.signature.net/index.php?title=IB_Statements/eventsub&amp;diff=2842&amp;oldid=prev"/>
				<updated>2010-06-04T18:19:29Z</updated>
		
		<summary type="html">&lt;p&gt;minor&lt;/p&gt;
&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 18:19, 4 June 2010&lt;/td&gt;
		&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 14:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 14:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''Discussion:'''&amp;nbsp; The EVENTSUB statement defines an event handling subroutine. Such a routine provides a way for your program to determine what to do when an event occurs. &amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''Discussion:'''&amp;nbsp; The EVENTSUB statement defines an event handling subroutine. Such a routine provides a way for your program to determine what to do when an event occurs. &amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;For example, an event occurs when the user clicks on the Comet hyperlink. For a detailed discussion of this topic, see [[Comet hyperlinks]]. &amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;For example, an event occurs when the user clicks on the Comet hyperlink. For a detailed discussion of this topic, see &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;'''&lt;/ins&gt;[[Comet hyperlinks]]&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;'''&lt;/ins&gt;. &amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''Note:''' To remove an eventsub trap, issue the statement without parameters, as follows: &amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''Note:''' To remove an eventsub trap, issue the statement without parameters, as follows: &amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key wikidb:diff:version:1.11a:oldid:2836:newid:2842 --&gt;
&lt;/table&gt;</summary>
		<author><name>Jim</name></author>	</entry>

	<entry>
		<id>http://wiki.signature.net/index.php?title=IB_Statements/eventsub&amp;diff=2836&amp;oldid=prev</id>
		<title>Jim: minor</title>
		<link rel="alternate" type="text/html" href="http://wiki.signature.net/index.php?title=IB_Statements/eventsub&amp;diff=2836&amp;oldid=prev"/>
				<updated>2010-06-04T17:44:24Z</updated>
		
		<summary type="html">&lt;p&gt;minor&lt;/p&gt;
&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 17:44, 4 June 2010&lt;/td&gt;
		&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 14:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 14:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''Discussion:'''&amp;nbsp; The EVENTSUB statement defines an event handling subroutine. Such a routine provides a way for your program to determine what to do when an event occurs. &amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''Discussion:'''&amp;nbsp; The EVENTSUB statement defines an event handling subroutine. Such a routine provides a way for your program to determine what to do when an event occurs. &amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;For example, an event occurs when the user clicks on the Comet hyperlink. For a detailed discussion of this topic, see Comet hyperlinks. &amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;For example, an event occurs when the user clicks on the Comet hyperlink. For a detailed discussion of this topic, see &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;[[&lt;/ins&gt;Comet hyperlinks&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;]]&lt;/ins&gt;. &amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''Note:''' To remove an eventsub trap, issue the statement without parameters, as follows: &amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''Note:''' To remove an eventsub trap, issue the statement without parameters, as follows: &amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key wikidb:diff:version:1.11a:oldid:379:newid:2836 --&gt;
&lt;/table&gt;</summary>
		<author><name>Jim</name></author>	</entry>

	<entry>
		<id>http://wiki.signature.net/index.php?title=IB_Statements/eventsub&amp;diff=379&amp;oldid=prev</id>
		<title>Badge: New page: '''EVENTSUB statement'''   '''Syntax:'''  EVENTSUB statement-label,event-string$,source-string$   '''where:'''    statement-label is the label of a statement in the current program where c...</title>
		<link rel="alternate" type="text/html" href="http://wiki.signature.net/index.php?title=IB_Statements/eventsub&amp;diff=379&amp;oldid=prev"/>
				<updated>2009-05-21T10:48:08Z</updated>
		
		<summary type="html">&lt;p&gt;New page: &amp;#39;&amp;#39;&amp;#39;EVENTSUB statement&amp;#39;&amp;#39;&amp;#39;   &amp;#39;&amp;#39;&amp;#39;Syntax:&amp;#39;&amp;#39;&amp;#39;  EVENTSUB statement-label,event-string$,source-string$   &amp;#39;&amp;#39;&amp;#39;where:&amp;#39;&amp;#39;&amp;#39;    statement-label is the label of a statement in the current program where c...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;'''EVENTSUB statement'''&lt;br /&gt;
 &lt;br /&gt;
'''Syntax:'''  EVENTSUB statement-label,event-string$,source-string$ &lt;br /&gt;
&lt;br /&gt;
'''where:''' &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
statement-label is the label of a statement in the current program where control is transferred when an event occurs. In this regard, the EVENTSUB statement is similar to the MESSAGESUB, ERRORSUB, and ESCAPESUB statements. &lt;br /&gt;
&lt;br /&gt;
event-string$ is a string variable whose value is assigned by the object that caused the action to occur. For example, this could be the value of the LinkAction$ field in a Comet hyperlink. &lt;br /&gt;
&lt;br /&gt;
source-string$ is reserved for future use &lt;br /&gt;
 &lt;br /&gt;
'''Discussion:'''  The EVENTSUB statement defines an event handling subroutine. Such a routine provides a way for your program to determine what to do when an event occurs. &lt;br /&gt;
&lt;br /&gt;
For example, an event occurs when the user clicks on the Comet hyperlink. For a detailed discussion of this topic, see Comet hyperlinks. &lt;br /&gt;
&lt;br /&gt;
'''Note:''' To remove an eventsub trap, issue the statement without parameters, as follows: &lt;br /&gt;
&lt;br /&gt;
EVENTSUB&lt;br /&gt;
&lt;br /&gt;
'''Some important notes:''' '''Bold text'''&lt;br /&gt;
&lt;br /&gt;
An event handling subroutine ends with a RETURN statement. This returns the program to the statement that was being executed when the event occurred. Thus, the normal program flow is maintained after an event has been processed. &lt;br /&gt;
&lt;br /&gt;
When your program is in an event handling subroutine, it can still receive events (e.g., the user can click on a second hyperlink while your program is still processing their first click). These events are queued by Comet. When your program re-sets the eventsub trap, it immediately processes any events that have been added to the queue. For this reason, we recommend re-setting the eventsub trap just prior to the Return statement. &lt;br /&gt;
&lt;br /&gt;
If your program executes an EVENTSUB statement without parameters, event handling is disabled and Comet purges all events that are in the event queue. &lt;br /&gt;
&lt;br /&gt;
It's acceptable to code multiple event handling subroutines in your program, although only one can be in effect at any given time. An event handling subroutine takes effect when the EVENTSUB statement is executed. &lt;br /&gt;
 &lt;br /&gt;
Example:  The following code segment shows a Comet hyperlink and a related EVENTSUB statement. When the user clicks on the hyperlink, the program branches to the GetEvent label and assigns &amp;quot;LINK1&amp;quot; to Event$. The event handling subroutine then determines what action to take, which in this case is a Print statement. Notice that the EVENTSUB statement is re-issued at the bottom of the routine, just prior to the Return statement. &lt;br /&gt;
&lt;br /&gt;
 Print @(0,4);(Hyperlink=&amp;quot;Chocolate&amp;quot;,&amp;quot;LINK1&amp;quot;,0) &lt;br /&gt;
 !&lt;br /&gt;
 EVENTSUB GetEvent,Event$,Source$&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 GetEvent:&lt;br /&gt;
 If Event$ = &amp;quot;LINK1&amp;quot; Then&lt;br /&gt;
 Print (WC);&amp;quot;Chocolate is a very good flavor.&amp;quot;&lt;br /&gt;
 Endif&lt;br /&gt;
 EVENTSUB GetEvent,Event$,Source$&lt;br /&gt;
 Return&lt;br /&gt;
&lt;br /&gt;
'''Note:''' This program is an excerpt from the HyprLink.ibs program in the DMW directory.&lt;/div&gt;</summary>
		<author><name>Badge</name></author>	</entry>

	</feed>