<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>
	Comments on: Setting system tray popup messages	</title>
	<atom:link href="https://undocumentedmatlab.com/articles/setting-system-tray-popup-messages/feed" rel="self" type="application/rss+xml" />
	<link>https://undocumentedmatlab.com/articles/setting-system-tray-popup-messages?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=setting-system-tray-popup-messages</link>
	<description>Professional Matlab consulting, development and training</description>
	<lastBuildDate>Thu, 24 Jul 2014 10:33:24 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.2</generator>
	<item>
		<title>
		By: Reymon		</title>
		<link>https://undocumentedmatlab.com/articles/setting-system-tray-popup-messages#comment-328449</link>

		<dc:creator><![CDATA[Reymon]]></dc:creator>
		<pubDate>Thu, 24 Jul 2014 10:33:24 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=130#comment-328449</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/setting-system-tray-popup-messages#comment-141984&quot;&gt;Thierry Dalon&lt;/a&gt;.

I used your code but I have eccepetion with this too.

When I use this code this code any exception. Is this true?
&lt;pre lang=&#039;matlab&#039;&gt;
set(tray,&#039;MousePressedCallback&#039;,@clearexc)
t = java.awt.Toolkit.getDefaultToolkit();
ev = t.getAWTEventListeners();
for i = 1 : length(ev)
    str = ev(i).getListener().getClass.toString;
    t.removeAWTEventListener(ev(i));
end
&lt;/pre&gt;

Is any problem with this code?

Thanks]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/setting-system-tray-popup-messages#comment-141984">Thierry Dalon</a>.</p>
<p>I used your code but I have eccepetion with this too.</p>
<p>When I use this code this code any exception. Is this true?</p>
<pre lang='matlab'>
set(tray,'MousePressedCallback',@clearexc)
t = java.awt.Toolkit.getDefaultToolkit();
ev = t.getAWTEventListeners();
for i = 1 : length(ev)
    str = ev(i).getListener().getClass.toString;
    t.removeAWTEventListener(ev(i));
end
</pre>
<p>Is any problem with this code?</p>
<p>Thanks</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/setting-system-tray-popup-messages#comment-145466</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Wed, 23 Jan 2013 11:30:47 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=130#comment-145466</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/setting-system-tray-popup-messages#comment-141985&quot;&gt;Thierry Dalon&lt;/a&gt;.

@Thierry - the popup is in general automatically removed by the operating system after several seconds. You can always set the popup message to empty (see the code in &lt;i&gt;&lt;b&gt;systray&lt;/b&gt;&lt;/i&gt; utility (&lt;i&gt;setIconMessage()&lt;/i&gt; sub-function). 

You can also delete and recreate the systray to get the same effect as workaround. Read the code in the &lt;i&gt;&lt;b&gt;systray&lt;/b&gt;&lt;/i&gt; utility to see how (basically, &lt;code&gt;java.awt.SystemTray.getSystemTray.remove(jcomp)&lt;/code&gt;).]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/setting-system-tray-popup-messages#comment-141985">Thierry Dalon</a>.</p>
<p>@Thierry &#8211; the popup is in general automatically removed by the operating system after several seconds. You can always set the popup message to empty (see the code in <i><b>systray</b></i> utility (<i>setIconMessage()</i> sub-function). </p>
<p>You can also delete and recreate the systray to get the same effect as workaround. Read the code in the <i><b>systray</b></i> utility to see how (basically, <code>java.awt.SystemTray.getSystemTray.remove(jcomp)</code>).</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Thierry Dalon		</title>
		<link>https://undocumentedmatlab.com/articles/setting-system-tray-popup-messages#comment-141985</link>

		<dc:creator><![CDATA[Thierry Dalon]]></dc:creator>
		<pubDate>Wed, 16 Jan 2013 10:14:47 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=130#comment-141985</guid>

					<description><![CDATA[I could not find a way to delete/clear the current popup message...]]></description>
			<content:encoded><![CDATA[<p>I could not find a way to delete/clear the current popup message&#8230;</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Thierry Dalon		</title>
		<link>https://undocumentedmatlab.com/articles/setting-system-tray-popup-messages#comment-141984</link>

		<dc:creator><![CDATA[Thierry Dalon]]></dc:creator>
		<pubDate>Wed, 16 Jan 2013 10:13:50 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=130#comment-141984</guid>

					<description><![CDATA[For handling recurring warnings because of java exceptions I&#039;ve come to the solution to clear the java events on mouse click. I had also to update the list of exceptions. See extracted code below:
&lt;pre lang=&#039;matlab&#039;&gt;
set(trayIcon,&#039;MousePressedCallback&#039;,@clearexc)

function clearexc()
   t = java.awt.Toolkit.getDefaultToolkit();
   ev = t.getAWTEventListeners();
   for i = 1 : length(ev)
      str = ev(i).getListener().getClass.toString;  
      if str.indexOf(&#039;com.mathworks.mwswing.desk.DTSelectionManager&#039;) &gt;= 0 &#124;&#124; ... % see http://undocumentedmatlab.com/blog/uisplitpane/#comment-658
         str.indexOf(&#039;javax.swing.plaf.basic.BasicLookAndFeel&#039;) &gt;= 0 &#124;&#124; ...
         str.indexOf(&#039;com.mathworks.widgets.text.mcode.MLintDecorator&#039;) &gt;= 0 &#124;&#124; ...
         str.indexOf(&#039;com.mathworks.widgets.desk.DTSelectionManager&#039;) &gt;=0 &#124;&#124; ... % TD
         str.indexOf(&#039;com.mathworks.widgets.grouptable.ToolTipSupport&#039;) &gt;=0 &#124;&#124; ... % TD
         str.indexOf(&#039;com.mathworks.widgets.text.STPMessagePanel&#039;) &gt;=0 &#124;&#124; ... % TD
         str.indexOf(&#039;com.mathworks.widgets.text.MWToolTipSupport&#039;) &gt;=0 &#124;&#124; ... % TD-&gt;crashes on double-click
         str.indexOf(&#039;com.mathworks.widgets.tooltip&#039;) &gt;=0, % TD
            t.removeAWTEventListener(ev(i));
            %disp(str)
      end
   end  % for ev
end  % function clearexc
&lt;/pre&gt;]]></description>
			<content:encoded><![CDATA[<p>For handling recurring warnings because of java exceptions I&#8217;ve come to the solution to clear the java events on mouse click. I had also to update the list of exceptions. See extracted code below:</p>
<pre lang='matlab'>
set(trayIcon,'MousePressedCallback',@clearexc)

function clearexc()
   t = java.awt.Toolkit.getDefaultToolkit();
   ev = t.getAWTEventListeners();
   for i = 1 : length(ev)
      str = ev(i).getListener().getClass.toString;  
      if str.indexOf('com.mathworks.mwswing.desk.DTSelectionManager') >= 0 || ... % see http://undocumentedmatlab.com/blog/uisplitpane/#comment-658
         str.indexOf('javax.swing.plaf.basic.BasicLookAndFeel') >= 0 || ...
         str.indexOf('com.mathworks.widgets.text.mcode.MLintDecorator') >= 0 || ...
         str.indexOf('com.mathworks.widgets.desk.DTSelectionManager') >=0 || ... % TD
         str.indexOf('com.mathworks.widgets.grouptable.ToolTipSupport') >=0 || ... % TD
         str.indexOf('com.mathworks.widgets.text.STPMessagePanel') >=0 || ... % TD
         str.indexOf('com.mathworks.widgets.text.MWToolTipSupport') >=0 || ... % TD->crashes on double-click
         str.indexOf('com.mathworks.widgets.tooltip') >=0, % TD
            t.removeAWTEventListener(ev(i));
            %disp(str)
      end
   end  % for ev
end  % function clearexc
</pre>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Thierry Dalon		</title>
		<link>https://undocumentedmatlab.com/articles/setting-system-tray-popup-messages#comment-140632</link>

		<dc:creator><![CDATA[Thierry Dalon]]></dc:creator>
		<pubDate>Fri, 11 Jan 2013 12:41:08 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=130#comment-140632</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/setting-system-tray-popup-messages#comment-140215&quot;&gt;Thierry Dalon&lt;/a&gt;.

One could convert cellstr in multi-lines char with one line:
msg={&#039;Another&#039;,&#039;multi-line&#039;,&#039;Example&#039;}
sprintf(&#039;%s\n&#039;,msg{:}) 
so one can then pass it to systray.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/setting-system-tray-popup-messages#comment-140215">Thierry Dalon</a>.</p>
<p>One could convert cellstr in multi-lines char with one line:<br />
msg={&#8216;Another&#8217;,&#8217;multi-line&#8217;,&#8217;Example&#8217;}<br />
sprintf(&#8216;%s\n&#8217;,msg{:})<br />
so one can then pass it to systray.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/setting-system-tray-popup-messages#comment-140314</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Thu, 10 Jan 2013 17:22:16 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=130#comment-140314</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/setting-system-tray-popup-messages#comment-140215&quot;&gt;Thierry Dalon&lt;/a&gt;.

@Thierry - indeed, char(10) can be used to break lines in the systray message. 

You might also try to use &lt;a href=&quot;http://undocumentedmatlab.com/blog/html-support-in-matlab-uicomponents/&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;HTML formatting&lt;/a&gt; with a &#060;br/&#062; tag (untested, but I think it should work).

Cell arrays are currently not supported unfortunately.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/setting-system-tray-popup-messages#comment-140215">Thierry Dalon</a>.</p>
<p>@Thierry &#8211; indeed, char(10) can be used to break lines in the systray message. </p>
<p>You might also try to use <a href="http://undocumentedmatlab.com/blog/html-support-in-matlab-uicomponents/" target="_blank" rel="nofollow">HTML formatting</a> with a &lt;br/&gt; tag (untested, but I think it should work).</p>
<p>Cell arrays are currently not supported unfortunately.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Thierry Dalon		</title>
		<link>https://undocumentedmatlab.com/articles/setting-system-tray-popup-messages#comment-140215</link>

		<dc:creator><![CDATA[Thierry Dalon]]></dc:creator>
		<pubDate>Thu, 10 Jan 2013 13:42:34 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=130#comment-140215</guid>

					<description><![CDATA[Hi Yair
nice utility!
In the post you don&#039;t provide the code for the multi-line example.
Do you use char(10) for breaking lines? Example: 
&lt;pre lang=&#039;matlab&#039;&gt;systray(hIconTray,&#039;Message&#039;,{&#039;title&#039;,[&#039;informational message&#039;,char(10),&#039;Second line&#039;],&#039;info&#039;})&lt;/pre&gt;

It may be nice if the systray function would accept as message as cellstr and breaking lines automatically like usual in Matlab msgbox.
Example:
&lt;pre lang=&#039;matlab&#039;&gt;systray(hIconTray,&#039;Message&#039;,{&#039;title&#039;,{&#039;informational message&#039;,&#039;Second line&#039;},&#039;info&#039;})&lt;/pre&gt;]]></description>
			<content:encoded><![CDATA[<p>Hi Yair<br />
nice utility!<br />
In the post you don&#8217;t provide the code for the multi-line example.<br />
Do you use char(10) for breaking lines? Example: </p>
<pre lang='matlab'>systray(hIconTray,'Message',{'title',['informational message',char(10),'Second line'],'info'})</pre>
<p>It may be nice if the systray function would accept as message as cellstr and breaking lines automatically like usual in Matlab msgbox.<br />
Example:</p>
<pre lang='matlab'>systray(hIconTray,'Message',{'title',{'informational message','Second line'},'info'})</pre>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: fahad		</title>
		<link>https://undocumentedmatlab.com/articles/setting-system-tray-popup-messages#comment-64752</link>

		<dc:creator><![CDATA[fahad]]></dc:creator>
		<pubDate>Thu, 08 Dec 2011 09:01:54 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=130#comment-64752</guid>

					<description><![CDATA[thanks for the code and the explanation with picures]]></description>
			<content:encoded><![CDATA[<p>thanks for the code and the explanation with picures</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/setting-system-tray-popup-messages#comment-56459</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Sat, 10 Sep 2011 16:44:23 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=130#comment-56459</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/setting-system-tray-popup-messages#comment-11138&quot;&gt;Peter&lt;/a&gt;.

@Mike - thanks - couldn&#039;t ask for anything more]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/setting-system-tray-popup-messages#comment-11138">Peter</a>.</p>
<p>@Mike &#8211; thanks &#8211; couldn&#8217;t ask for anything more</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Mike		</title>
		<link>https://undocumentedmatlab.com/articles/setting-system-tray-popup-messages#comment-56441</link>

		<dc:creator><![CDATA[Mike]]></dc:creator>
		<pubDate>Sat, 10 Sep 2011 12:31:59 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=130#comment-56441</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/setting-system-tray-popup-messages#comment-11138&quot;&gt;Peter&lt;/a&gt;.

That looks like a &quot;bug.&quot; I&#039;ll ask them to fix it, but the earliest it would be done would be 12b, if at all...]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/setting-system-tray-popup-messages#comment-11138">Peter</a>.</p>
<p>That looks like a &#8220;bug.&#8221; I&#8217;ll ask them to fix it, but the earliest it would be done would be 12b, if at all&#8230;</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
