<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?action=history&amp;feed=atom&amp;title=Programmer_Guide%2FMacro_Library%2FSETMSGHANDLER</id>
	<title>Programmer Guide/Macro Library/SETMSGHANDLER - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?action=history&amp;feed=atom&amp;title=Programmer_Guide%2FMacro_Library%2FSETMSGHANDLER"/>
	<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Macro_Library/SETMSGHANDLER&amp;action=history"/>
	<updated>2026-05-07T05:27:29Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Macro_Library/SETMSGHANDLER&amp;diff=10458&amp;oldid=prev</id>
		<title>Jw: /* Examples: */</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Macro_Library/SETMSGHANDLER&amp;diff=10458&amp;oldid=prev"/>
		<updated>2019-08-06T07:04:34Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Examples:&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 09:04, 6 August 2019&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l26&quot;&gt;Line 26:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 26:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;SETMSGHANDLER VALUE * MH_VALUEITEM&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;SETMSGHANDLER VALUE * MH_VALUEITEM&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;==See also==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Programmer_Guide/Macro_Library/GETMESSAGE|GETMESSAGE]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Jw</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Macro_Library/SETMSGHANDLER&amp;diff=10457&amp;oldid=prev</id>
		<title>Jw: /* SETMSGHANDLER */</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Macro_Library/SETMSGHANDLER&amp;diff=10457&amp;oldid=prev"/>
		<updated>2019-08-06T07:03:52Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;SETMSGHANDLER&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 09:03, 6 August 2019&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l2&quot;&gt;Line 2:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 2:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==SETMSGHANDLER==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==SETMSGHANDLER==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Install the message handler &amp;lt;var&amp;gt;handler&amp;lt;/var&amp;gt; for the sender(s) defined by &amp;lt;var&amp;gt;type name&amp;lt;/var&amp;gt;. If no handler is supplied, the message handler is deinstalled. If a message handler is installed for &amp;lt;var&amp;gt;type name&amp;lt;/var&amp;gt;, the macro &amp;lt;code&amp;gt;[[Programmer_Guide/Macro_Library/&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;StdLib#GetMessage&lt;/del&gt;|GETMESSAGE]]&amp;lt;/code&amp;gt; calls the handler function when receiving messages of &amp;lt;var&amp;gt;type name&amp;lt;/var&amp;gt;. This means the messages are not returned (except if the keyword &amp;lt;code&amp;gt;RETURN&amp;lt;/code&amp;gt; was used as a handler argument). A message handler function receives the whole message (&amp;lt;code&amp;gt;type name id par&amp;lt;/code&amp;gt;) as an argument string.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Install the message handler &amp;lt;var&amp;gt;handler&amp;lt;/var&amp;gt; for the sender(s) defined by &amp;lt;var&amp;gt;type name&amp;lt;/var&amp;gt;. If no handler is supplied, the message handler is deinstalled. If a message handler is installed for &amp;lt;var&amp;gt;type name&amp;lt;/var&amp;gt;, the macro &amp;lt;code&amp;gt;[[Programmer_Guide/Macro_Library/&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;GETMESSAGE&lt;/ins&gt;|GETMESSAGE]]&amp;lt;/code&amp;gt; calls the handler function when receiving messages of &amp;lt;var&amp;gt;type name&amp;lt;/var&amp;gt;. This means the messages are not returned (except if the keyword &amp;lt;code&amp;gt;RETURN&amp;lt;/code&amp;gt; was used as a handler argument). A message handler function receives the whole message (&amp;lt;code&amp;gt;type name id par&amp;lt;/code&amp;gt;) as an argument string.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The message dispatching system is only active while the macro &amp;lt;code&amp;gt;GETMESSAGE&amp;lt;/code&amp;gt; is running!&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The message dispatching system is only active while the macro &amp;lt;code&amp;gt;GETMESSAGE&amp;lt;/code&amp;gt; is running!&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Jw</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Macro_Library/SETMSGHANDLER&amp;diff=10425&amp;oldid=prev</id>
		<title>Jw: /* Parameters: */</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Macro_Library/SETMSGHANDLER&amp;diff=10425&amp;oldid=prev"/>
		<updated>2019-06-14T09:43:13Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Parameters:&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 11:43, 14 June 2019&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l13&quot;&gt;Line 13:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 13:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;;type:The item type of sender; any shell item type (sending messages) or &amp;lt;code&amp;gt;SHELL&amp;lt;/code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;;type:The item type of sender; any shell item type (sending messages) or &amp;lt;code&amp;gt;SHELL&amp;lt;/code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;;name:The name of the sender; shell item name, shell id or &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; for all items of the specified type &amp;lt;var&amp;gt;type&amp;lt;/var&amp;gt;.&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;handlerThe &lt;/del&gt;message handler function. This function will be called when a message for an item corresponding to &amp;lt;var&amp;gt;type&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;name&amp;lt;/var&amp;gt; is received. If &amp;lt;var&amp;gt;handler&amp;lt;/var&amp;gt; is not supplied, any previously installed message handler for &amp;lt;var&amp;gt;type name&amp;lt;/var&amp;gt; is removed. The handler function can be either a macro (&amp;lt;var&amp;gt;handler&amp;lt;/var&amp;gt; = macroname) or a class member-function (&amp;lt;var&amp;gt;handler&amp;lt;/var&amp;gt; = memberfunction instance). The following keywords are also supported: &amp;lt;code&amp;gt;IGNORE&amp;lt;/code&amp;gt; (all messages for &amp;lt;var&amp;gt;type&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;name&amp;lt;/var&amp;gt; are ignored) and &amp;lt;code&amp;gt;RETURN&amp;lt;/code&amp;gt; (return from &amp;lt;code&amp;gt;GETMESSAGE&amp;lt;/code&amp;gt; if a message for &amp;lt;var&amp;gt;type&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;name&amp;lt;/var&amp;gt; is received). If the &amp;lt;var&amp;gt;type&amp;lt;/var&amp;gt; is &amp;lt;code&amp;gt;SPU&amp;lt;/code&amp;gt;,the following keywords are also supported: &amp;lt;code&amp;gt;KILLSPUONSTOP&amp;lt;/code&amp;gt; (the SPU is deleted when the &amp;lt;code&amp;gt;STOP&amp;lt;/code&amp;gt; message is received) and &amp;lt;code&amp;gt;KILLSPUONEXIT&amp;lt;/code&amp;gt; (the SPU is deleted when the &amp;lt;code&amp;gt;EXIT&amp;lt;/code&amp;gt; message is received). The message handler function receives the whole message (&amp;lt;code&amp;gt;type name id par&amp;lt;/code&amp;gt;) as an argument string.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;;name:The name of the sender; shell item name, shell id or &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; for all items of the specified type &amp;lt;var&amp;gt;type&amp;lt;/var&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;;handler:The &lt;/ins&gt;message handler function. This function will be called when a message for an item corresponding to &amp;lt;var&amp;gt;type&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;name&amp;lt;/var&amp;gt; is received. If &amp;lt;var&amp;gt;handler&amp;lt;/var&amp;gt; is not supplied, any previously installed message handler for &amp;lt;var&amp;gt;type name&amp;lt;/var&amp;gt; is removed. The handler function can be either a macro (&amp;lt;var&amp;gt;handler&amp;lt;/var&amp;gt; = macroname) or a class member-function (&amp;lt;var&amp;gt;handler&amp;lt;/var&amp;gt; = memberfunction instance). The following keywords are also supported: &amp;lt;code&amp;gt;IGNORE&amp;lt;/code&amp;gt; (all messages for &amp;lt;var&amp;gt;type&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;name&amp;lt;/var&amp;gt; are ignored) and &amp;lt;code&amp;gt;RETURN&amp;lt;/code&amp;gt; (return from &amp;lt;code&amp;gt;GETMESSAGE&amp;lt;/code&amp;gt; if a message for &amp;lt;var&amp;gt;type&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;name&amp;lt;/var&amp;gt; is received). If the &amp;lt;var&amp;gt;type&amp;lt;/var&amp;gt; is &amp;lt;code&amp;gt;SPU&amp;lt;/code&amp;gt;,the following keywords are also supported: &amp;lt;code&amp;gt;KILLSPUONSTOP&amp;lt;/code&amp;gt; (the SPU is deleted when the &amp;lt;code&amp;gt;STOP&amp;lt;/code&amp;gt; message is received) and &amp;lt;code&amp;gt;KILLSPUONEXIT&amp;lt;/code&amp;gt; (the SPU is deleted when the &amp;lt;code&amp;gt;EXIT&amp;lt;/code&amp;gt; message is received). The message handler function receives the whole message (&amp;lt;code&amp;gt;type name id par&amp;lt;/code&amp;gt;) as an argument string.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=====Result:=====&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=====Result:=====&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Jw</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Macro_Library/SETMSGHANDLER&amp;diff=10424&amp;oldid=prev</id>
		<title>Jw: /* Parameters: */</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Macro_Library/SETMSGHANDLER&amp;diff=10424&amp;oldid=prev"/>
		<updated>2019-06-14T09:42:52Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Parameters:&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 11:42, 14 June 2019&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l12&quot;&gt;Line 12:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 12:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=====Parameters:=====&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=====Parameters:=====&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;;type:The item type of sender; any shell item type (sending messages) or &amp;lt;code&amp;gt;SHELL&amp;lt;/code&amp;gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;nameThe &lt;/del&gt;name of the sender; shell item name, shell id or &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; for all items of the specified type &amp;lt;var&amp;gt;type&amp;lt;/var&amp;gt;.handlerThe message handler function. This function will be called when a message for an item corresponding to &amp;lt;var&amp;gt;type&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;name&amp;lt;/var&amp;gt; is received. If &amp;lt;var&amp;gt;handler&amp;lt;/var&amp;gt; is not supplied, any previously installed message handler for &amp;lt;var&amp;gt;type name&amp;lt;/var&amp;gt; is removed. The handler function can be either a macro (&amp;lt;var&amp;gt;handler&amp;lt;/var&amp;gt; = macroname) or a class member-function (&amp;lt;var&amp;gt;handler&amp;lt;/var&amp;gt; = memberfunction instance). The following keywords are also supported: &amp;lt;code&amp;gt;IGNORE&amp;lt;/code&amp;gt; (all messages for &amp;lt;var&amp;gt;type&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;name&amp;lt;/var&amp;gt; are ignored) and &amp;lt;code&amp;gt;RETURN&amp;lt;/code&amp;gt; (return from &amp;lt;code&amp;gt;GETMESSAGE&amp;lt;/code&amp;gt; if a message for &amp;lt;var&amp;gt;type&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;name&amp;lt;/var&amp;gt; is received). If the &amp;lt;var&amp;gt;type&amp;lt;/var&amp;gt; is &amp;lt;code&amp;gt;SPU&amp;lt;/code&amp;gt;,the following keywords are also supported: &amp;lt;code&amp;gt;KILLSPUONSTOP&amp;lt;/code&amp;gt; (the SPU is deleted when the &amp;lt;code&amp;gt;STOP&amp;lt;/code&amp;gt; message is received) and &amp;lt;code&amp;gt;KILLSPUONEXIT&amp;lt;/code&amp;gt; (the SPU is deleted when the &amp;lt;code&amp;gt;EXIT&amp;lt;/code&amp;gt; message is received). The message handler function receives the whole message (&amp;lt;code&amp;gt;type name id par&amp;lt;/code&amp;gt;) as an argument string.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;;type:The item type of sender; any shell item type (sending messages) or &amp;lt;code&amp;gt;SHELL&amp;lt;/code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;;name:The &lt;/ins&gt;name of the sender; shell item name, shell id or &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; for all items of the specified type &amp;lt;var&amp;gt;type&amp;lt;/var&amp;gt;.handlerThe message handler function. This function will be called when a message for an item corresponding to &amp;lt;var&amp;gt;type&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;name&amp;lt;/var&amp;gt; is received. If &amp;lt;var&amp;gt;handler&amp;lt;/var&amp;gt; is not supplied, any previously installed message handler for &amp;lt;var&amp;gt;type name&amp;lt;/var&amp;gt; is removed. The handler function can be either a macro (&amp;lt;var&amp;gt;handler&amp;lt;/var&amp;gt; = macroname) or a class member-function (&amp;lt;var&amp;gt;handler&amp;lt;/var&amp;gt; = memberfunction instance). The following keywords are also supported: &amp;lt;code&amp;gt;IGNORE&amp;lt;/code&amp;gt; (all messages for &amp;lt;var&amp;gt;type&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;name&amp;lt;/var&amp;gt; are ignored) and &amp;lt;code&amp;gt;RETURN&amp;lt;/code&amp;gt; (return from &amp;lt;code&amp;gt;GETMESSAGE&amp;lt;/code&amp;gt; if a message for &amp;lt;var&amp;gt;type&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;name&amp;lt;/var&amp;gt; is received). If the &amp;lt;var&amp;gt;type&amp;lt;/var&amp;gt; is &amp;lt;code&amp;gt;SPU&amp;lt;/code&amp;gt;,the following keywords are also supported: &amp;lt;code&amp;gt;KILLSPUONSTOP&amp;lt;/code&amp;gt; (the SPU is deleted when the &amp;lt;code&amp;gt;STOP&amp;lt;/code&amp;gt; message is received) and &amp;lt;code&amp;gt;KILLSPUONEXIT&amp;lt;/code&amp;gt; (the SPU is deleted when the &amp;lt;code&amp;gt;EXIT&amp;lt;/code&amp;gt; message is received). The message handler function receives the whole message (&amp;lt;code&amp;gt;type name id par&amp;lt;/code&amp;gt;) as an argument string.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=====Result:=====&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=====Result:=====&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Jw</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Macro_Library/SETMSGHANDLER&amp;diff=10423&amp;oldid=prev</id>
		<title>Jw: /* Parameters: */</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Macro_Library/SETMSGHANDLER&amp;diff=10423&amp;oldid=prev"/>
		<updated>2019-06-14T09:42:37Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Parameters:&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 11:42, 14 June 2019&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l12&quot;&gt;Line 12:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 12:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=====Parameters:=====&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=====Parameters:=====&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;typeThe &lt;/del&gt;item type of sender; any shell item type (sending messages) or &amp;lt;code&amp;gt;SHELL&amp;lt;/code&amp;gt;nameThe name of the sender; shell item name, shell id or &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; for all items of the specified type &amp;lt;var&amp;gt;type&amp;lt;/var&amp;gt;.handlerThe message handler function. This function will be called when a message for an item corresponding to &amp;lt;var&amp;gt;type&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;name&amp;lt;/var&amp;gt; is received. If &amp;lt;var&amp;gt;handler&amp;lt;/var&amp;gt; is not supplied, any previously installed message handler for &amp;lt;var&amp;gt;type name&amp;lt;/var&amp;gt; is removed. The handler function can be either a macro (&amp;lt;var&amp;gt;handler&amp;lt;/var&amp;gt; = macroname) or a class member-function (&amp;lt;var&amp;gt;handler&amp;lt;/var&amp;gt; = memberfunction instance). The following keywords are also supported: &amp;lt;code&amp;gt;IGNORE&amp;lt;/code&amp;gt; (all messages for &amp;lt;var&amp;gt;type&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;name&amp;lt;/var&amp;gt; are ignored) and &amp;lt;code&amp;gt;RETURN&amp;lt;/code&amp;gt; (return from &amp;lt;code&amp;gt;GETMESSAGE&amp;lt;/code&amp;gt; if a message for &amp;lt;var&amp;gt;type&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;name&amp;lt;/var&amp;gt; is received). If the &amp;lt;var&amp;gt;type&amp;lt;/var&amp;gt; is &amp;lt;code&amp;gt;SPU&amp;lt;/code&amp;gt;,the following keywords are also supported: &amp;lt;code&amp;gt;KILLSPUONSTOP&amp;lt;/code&amp;gt; (the SPU is deleted when the &amp;lt;code&amp;gt;STOP&amp;lt;/code&amp;gt; message is received) and &amp;lt;code&amp;gt;KILLSPUONEXIT&amp;lt;/code&amp;gt; (the SPU is deleted when the &amp;lt;code&amp;gt;EXIT&amp;lt;/code&amp;gt; message is received). The message handler function receives the whole message (&amp;lt;code&amp;gt;type name id par&amp;lt;/code&amp;gt;) as an argument string.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;;type:The &lt;/ins&gt;item type of sender; any shell item type (sending messages) or &amp;lt;code&amp;gt;SHELL&amp;lt;/code&amp;gt;nameThe name of the sender; shell item name, shell id or &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; for all items of the specified type &amp;lt;var&amp;gt;type&amp;lt;/var&amp;gt;.handlerThe message handler function. This function will be called when a message for an item corresponding to &amp;lt;var&amp;gt;type&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;name&amp;lt;/var&amp;gt; is received. If &amp;lt;var&amp;gt;handler&amp;lt;/var&amp;gt; is not supplied, any previously installed message handler for &amp;lt;var&amp;gt;type name&amp;lt;/var&amp;gt; is removed. The handler function can be either a macro (&amp;lt;var&amp;gt;handler&amp;lt;/var&amp;gt; = macroname) or a class member-function (&amp;lt;var&amp;gt;handler&amp;lt;/var&amp;gt; = memberfunction instance). The following keywords are also supported: &amp;lt;code&amp;gt;IGNORE&amp;lt;/code&amp;gt; (all messages for &amp;lt;var&amp;gt;type&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;name&amp;lt;/var&amp;gt; are ignored) and &amp;lt;code&amp;gt;RETURN&amp;lt;/code&amp;gt; (return from &amp;lt;code&amp;gt;GETMESSAGE&amp;lt;/code&amp;gt; if a message for &amp;lt;var&amp;gt;type&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;name&amp;lt;/var&amp;gt; is received). If the &amp;lt;var&amp;gt;type&amp;lt;/var&amp;gt; is &amp;lt;code&amp;gt;SPU&amp;lt;/code&amp;gt;,the following keywords are also supported: &amp;lt;code&amp;gt;KILLSPUONSTOP&amp;lt;/code&amp;gt; (the SPU is deleted when the &amp;lt;code&amp;gt;STOP&amp;lt;/code&amp;gt; message is received) and &amp;lt;code&amp;gt;KILLSPUONEXIT&amp;lt;/code&amp;gt; (the SPU is deleted when the &amp;lt;code&amp;gt;EXIT&amp;lt;/code&amp;gt; message is received). The message handler function receives the whole message (&amp;lt;code&amp;gt;type name id par&amp;lt;/code&amp;gt;) as an argument string.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=====Result:=====&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=====Result:=====&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Jw</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Macro_Library/SETMSGHANDLER&amp;diff=9755&amp;oldid=prev</id>
		<title>Jw at 07:46, 23 February 2018</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Macro_Library/SETMSGHANDLER&amp;diff=9755&amp;oldid=prev"/>
		<updated>2018-02-23T07:46:36Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 09:46, 23 February 2018&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l2&quot;&gt;Line 2:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 2:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==SETMSGHANDLER==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==SETMSGHANDLER==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Install the message handler &amp;lt;var&amp;gt;handler&amp;lt;/var&amp;gt; for the sender(s) defined by &amp;lt;var&amp;gt;type name&amp;lt;/var&amp;gt;. If no handler is supplied, the message handler is deinstalled. If a message handler is installed for &amp;lt;var&amp;gt;type name&amp;lt;/var&amp;gt;, the macro &amp;lt;code&amp;gt;GETMESSAGE&amp;lt;/code&amp;gt; calls the handler function when receiving messages of &amp;lt;var&amp;gt;type name&amp;lt;/var&amp;gt;. This means the messages are not returned (except if the keyword &amp;lt;code&amp;gt;RETURN&amp;lt;/code&amp;gt; was used as a handler argument). A message handler function receives the whole message (&amp;lt;code&amp;gt;type name id par&amp;lt;/code&amp;gt;) as an argument string.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Install the message handler &amp;lt;var&amp;gt;handler&amp;lt;/var&amp;gt; for the sender(s) defined by &amp;lt;var&amp;gt;type name&amp;lt;/var&amp;gt;. If no handler is supplied, the message handler is deinstalled. If a message handler is installed for &amp;lt;var&amp;gt;type name&amp;lt;/var&amp;gt;, the macro &amp;lt;code&amp;gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Programmer_Guide/Macro_Library/StdLib#GetMessage|&lt;/ins&gt;GETMESSAGE&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;]]&lt;/ins&gt;&amp;lt;/code&amp;gt; calls the handler function when receiving messages of &amp;lt;var&amp;gt;type name&amp;lt;/var&amp;gt;. This means the messages are not returned (except if the keyword &amp;lt;code&amp;gt;RETURN&amp;lt;/code&amp;gt; was used as a handler argument). A message handler function receives the whole message (&amp;lt;code&amp;gt;type name id par&amp;lt;/code&amp;gt;) as an argument string.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The message dispatching system is only active while the macro &amp;lt;code&amp;gt;GETMESSAGE&amp;lt;/code&amp;gt; is running!&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The message dispatching system is only active while the macro &amp;lt;code&amp;gt;GETMESSAGE&amp;lt;/code&amp;gt; is running!&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Jw</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Macro_Library/SETMSGHANDLER&amp;diff=9754&amp;oldid=prev</id>
		<title>Jw at 07:43, 23 February 2018</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Macro_Library/SETMSGHANDLER&amp;diff=9754&amp;oldid=prev"/>
		<updated>2018-02-23T07:43:18Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 09:43, 23 February 2018&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l12&quot;&gt;Line 12:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 12:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=====Parameters:=====&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=====Parameters:=====&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;typeThe item type of sender; any shell item type (sending messages) or &amp;lt;code&amp;gt;SHELL&amp;lt;/code&amp;gt;nameThe name of the sender; shell item name, shell id or &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; for all items of the specified type &amp;lt;var&amp;gt;type&amp;lt;/var&amp;gt;.handlerThe message handler function. This function will be called when a message for an item corresponding to &amp;lt;var&amp;gt;type&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;name&amp;lt;/var&amp;gt; is received. If &amp;lt;var&amp;gt;handler&amp;lt;/var&amp;gt; is not supplied, any previously installed message handler for &amp;lt;var&amp;gt;type name&amp;lt;/var&amp;gt; is removed. The handler function can be either a macro (&amp;lt;var&amp;gt;handler&amp;lt;/var&amp;gt; = macroname) or a class member-function (&amp;lt;var&amp;gt;handler&amp;lt;/var&amp;gt; = memberfunction instance). The following keywords are also supported: &amp;lt;code&amp;gt;IGNORE&amp;lt;/code&amp;gt; (all messages for &amp;lt;var&amp;gt;type&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;name&amp;lt;/var&amp;gt; are ignored) and &amp;lt;code&amp;gt;RETURN&amp;lt;/code&amp;gt; (return from &amp;lt;code&amp;gt;GETMESSAGE&amp;lt;/code&amp;gt; if a message for &amp;lt;var&amp;gt;type&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;name&amp;lt;/var&amp;gt; is received). If the &amp;lt;var&amp;gt;type&amp;lt;/var&amp;gt; is &amp;lt;code&amp;gt;SPU&amp;lt;/code&amp;gt;,the following keywords are also supported: &amp;lt;code&amp;gt;KILLSPUONSTOP&amp;lt;/code&amp;gt; (the SPU is deleted when the &amp;lt;code&amp;gt;STOP&amp;lt;/code&amp;gt; message is received) and &amp;lt;code&amp;gt;KILLSPUONEXIT&amp;lt;/code&amp;gt; (the SPU is deleted when the &amp;lt;code&amp;gt;EXIT&amp;lt;/code&amp;gt; message is received). The message handler function receives the whole message (&amp;lt;code&amp;gt;type name id par&amp;lt;/code&amp;gt;) as an argument string.=====Result:=====&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;typeThe item type of sender; any shell item type (sending messages) or &amp;lt;code&amp;gt;SHELL&amp;lt;/code&amp;gt;nameThe name of the sender; shell item name, shell id or &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; for all items of the specified type &amp;lt;var&amp;gt;type&amp;lt;/var&amp;gt;.handlerThe message handler function. This function will be called when a message for an item corresponding to &amp;lt;var&amp;gt;type&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;name&amp;lt;/var&amp;gt; is received. If &amp;lt;var&amp;gt;handler&amp;lt;/var&amp;gt; is not supplied, any previously installed message handler for &amp;lt;var&amp;gt;type name&amp;lt;/var&amp;gt; is removed. The handler function can be either a macro (&amp;lt;var&amp;gt;handler&amp;lt;/var&amp;gt; = macroname) or a class member-function (&amp;lt;var&amp;gt;handler&amp;lt;/var&amp;gt; = memberfunction instance). The following keywords are also supported: &amp;lt;code&amp;gt;IGNORE&amp;lt;/code&amp;gt; (all messages for &amp;lt;var&amp;gt;type&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;name&amp;lt;/var&amp;gt; are ignored) and &amp;lt;code&amp;gt;RETURN&amp;lt;/code&amp;gt; (return from &amp;lt;code&amp;gt;GETMESSAGE&amp;lt;/code&amp;gt; if a message for &amp;lt;var&amp;gt;type&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;name&amp;lt;/var&amp;gt; is received). If the &amp;lt;var&amp;gt;type&amp;lt;/var&amp;gt; is &amp;lt;code&amp;gt;SPU&amp;lt;/code&amp;gt;,the following keywords are also supported: &amp;lt;code&amp;gt;KILLSPUONSTOP&amp;lt;/code&amp;gt; (the SPU is deleted when the &amp;lt;code&amp;gt;STOP&amp;lt;/code&amp;gt; message is received) and &amp;lt;code&amp;gt;KILLSPUONEXIT&amp;lt;/code&amp;gt; (the SPU is deleted when the &amp;lt;code&amp;gt;EXIT&amp;lt;/code&amp;gt; message is received). The message handler function receives the whole message (&amp;lt;code&amp;gt;type name id par&amp;lt;/code&amp;gt;) as an argument string.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=====Result:=====&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;void&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;void&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Jw</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Macro_Library/SETMSGHANDLER&amp;diff=942&amp;oldid=prev</id>
		<title>Admin: 1 revision:&amp;#32;Initial import</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Macro_Library/SETMSGHANDLER&amp;diff=942&amp;oldid=prev"/>
		<updated>2010-11-18T16:31:26Z</updated>

		<summary type="html">&lt;p&gt;1 revision: Initial import&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 18:31, 18 November 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Macro_Library/SETMSGHANDLER&amp;diff=941&amp;oldid=prev</id>
		<title>193.171.195.8: initial import</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Macro_Library/SETMSGHANDLER&amp;diff=941&amp;oldid=prev"/>
		<updated>2010-05-17T13:05:27Z</updated>

		<summary type="html">&lt;p&gt;initial import&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
==SETMSGHANDLER==&lt;br /&gt;
&lt;br /&gt;
Install the message handler &amp;lt;var&amp;gt;handler&amp;lt;/var&amp;gt; for the sender(s) defined by &amp;lt;var&amp;gt;type name&amp;lt;/var&amp;gt;. If no handler is supplied, the message handler is deinstalled. If a message handler is installed for &amp;lt;var&amp;gt;type name&amp;lt;/var&amp;gt;, the macro &amp;lt;code&amp;gt;GETMESSAGE&amp;lt;/code&amp;gt; calls the handler function when receiving messages of &amp;lt;var&amp;gt;type name&amp;lt;/var&amp;gt;. This means the messages are not returned (except if the keyword &amp;lt;code&amp;gt;RETURN&amp;lt;/code&amp;gt; was used as a handler argument). A message handler function receives the whole message (&amp;lt;code&amp;gt;type name id par&amp;lt;/code&amp;gt;) as an argument string.&lt;br /&gt;
&lt;br /&gt;
The message dispatching system is only active while the macro &amp;lt;code&amp;gt;GETMESSAGE&amp;lt;/code&amp;gt; is running!&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SETMSGHANDLER &amp;lt;var&amp;gt;type&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;name&amp;lt;/var&amp;gt; [&amp;lt;var&amp;gt;handler&amp;lt;/var&amp;gt;]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
typeThe item type of sender; any shell item type (sending messages) or &amp;lt;code&amp;gt;SHELL&amp;lt;/code&amp;gt;nameThe name of the sender; shell item name, shell id or &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; for all items of the specified type &amp;lt;var&amp;gt;type&amp;lt;/var&amp;gt;.handlerThe message handler function. This function will be called when a message for an item corresponding to &amp;lt;var&amp;gt;type&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;name&amp;lt;/var&amp;gt; is received. If &amp;lt;var&amp;gt;handler&amp;lt;/var&amp;gt; is not supplied, any previously installed message handler for &amp;lt;var&amp;gt;type name&amp;lt;/var&amp;gt; is removed. The handler function can be either a macro (&amp;lt;var&amp;gt;handler&amp;lt;/var&amp;gt; = macroname) or a class member-function (&amp;lt;var&amp;gt;handler&amp;lt;/var&amp;gt; = memberfunction instance). The following keywords are also supported: &amp;lt;code&amp;gt;IGNORE&amp;lt;/code&amp;gt; (all messages for &amp;lt;var&amp;gt;type&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;name&amp;lt;/var&amp;gt; are ignored) and &amp;lt;code&amp;gt;RETURN&amp;lt;/code&amp;gt; (return from &amp;lt;code&amp;gt;GETMESSAGE&amp;lt;/code&amp;gt; if a message for &amp;lt;var&amp;gt;type&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;name&amp;lt;/var&amp;gt; is received). If the &amp;lt;var&amp;gt;type&amp;lt;/var&amp;gt; is &amp;lt;code&amp;gt;SPU&amp;lt;/code&amp;gt;,the following keywords are also supported: &amp;lt;code&amp;gt;KILLSPUONSTOP&amp;lt;/code&amp;gt; (the SPU is deleted when the &amp;lt;code&amp;gt;STOP&amp;lt;/code&amp;gt; message is received) and &amp;lt;code&amp;gt;KILLSPUONEXIT&amp;lt;/code&amp;gt; (the SPU is deleted when the &amp;lt;code&amp;gt;EXIT&amp;lt;/code&amp;gt; message is received). The message handler function receives the whole message (&amp;lt;code&amp;gt;type name id par&amp;lt;/code&amp;gt;) as an argument string.=====Result:=====&lt;br /&gt;
&lt;br /&gt;
void&lt;br /&gt;
&lt;br /&gt;
=====Examples:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Any messages for value items are passed to the macro MH_VALUEITEM.&lt;br /&gt;
SETMSGHANDLER VALUE * MH_VALUEITEM&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>193.171.195.8</name></author>
	</entry>
</feed>