<?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 status-bar text	</title>
	<atom:link href="https://undocumentedmatlab.com/articles/setting-status-bar-text/feed" rel="self" type="application/rss+xml" />
	<link>https://undocumentedmatlab.com/articles/setting-status-bar-text?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=setting-status-bar-text</link>
	<description>Professional Matlab consulting, development and training</description>
	<lastBuildDate>Thu, 08 Oct 2015 22:00:20 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.2</generator>
	<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/setting-status-bar-text#comment-358578</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Thu, 08 Oct 2015 22:00:20 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=465#comment-358578</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/setting-status-bar-text#comment-358571&quot;&gt;Jules-Florent EYA&lt;/a&gt;.

If the window is not visible then this would be the expected result]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/setting-status-bar-text#comment-358571">Jules-Florent EYA</a>.</p>
<p>If the window is not visible then this would be the expected result</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Jules-Florent EYA		</title>
		<link>https://undocumentedmatlab.com/articles/setting-status-bar-text#comment-358571</link>

		<dc:creator><![CDATA[Jules-Florent EYA]]></dc:creator>
		<pubDate>Thu, 08 Oct 2015 19:45:59 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=465#comment-358571</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/setting-status-bar-text#comment-358566&quot;&gt;Yair Altman&lt;/a&gt;.

Yair, this is the code of my function :

&lt;pre lang=&#039;matlab&#039;&gt;
% buildStatusBarObject
function this = buildStatusBarObject(this)
    jFrame = get(this.mainWindow,&#039;JavaFrame&#039;);
    if(isempty(jFrame))
        Logger.logError(&#039;Retrieved an EMPTY jFrame Object&#039;);
    end
    drawnow;
    pause(0.5);
    try
        % This works up to R2011a
        jRootPane = jFrame.fFigureClient.getWindow;
    catch
        try
            % This works from R2008b and up, up to HG2
            jRootPane = jFrame.fHG1Client.getWindow;
        catch
            % This works in HG2
            jRootPane = jFrame.fHG2Client.getWindow;
        end
    end
    statusbarObj = com.mathworks.mwswing.MJStatusBar;
    jRootPane.setStatusBar(statusbarObj);
    statusbarObj.setText(&#039;please wait - processing...&#039;)
    jRootPane.setStatusBarVisible(true);
end
&lt;/pre&gt;

The jRootPane is still empty, this is why the call &#039;&#039;jRootPane.setStatusBar(statusbarObj);&#039;&#039; creates the following error : Attempt to reference field of non-structure array.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/setting-status-bar-text#comment-358566">Yair Altman</a>.</p>
<p>Yair, this is the code of my function :</p>
<pre lang='matlab'>
% buildStatusBarObject
function this = buildStatusBarObject(this)
    jFrame = get(this.mainWindow,'JavaFrame');
    if(isempty(jFrame))
        Logger.logError('Retrieved an EMPTY jFrame Object');
    end
    drawnow;
    pause(0.5);
    try
        % This works up to R2011a
        jRootPane = jFrame.fFigureClient.getWindow;
    catch
        try
            % This works from R2008b and up, up to HG2
            jRootPane = jFrame.fHG1Client.getWindow;
        catch
            % This works in HG2
            jRootPane = jFrame.fHG2Client.getWindow;
        end
    end
    statusbarObj = com.mathworks.mwswing.MJStatusBar;
    jRootPane.setStatusBar(statusbarObj);
    statusbarObj.setText('please wait - processing...')
    jRootPane.setStatusBarVisible(true);
end
</pre>
<p>The jRootPane is still empty, this is why the call &#8221;jRootPane.setStatusBar(statusbarObj);&#8221; creates the following error : Attempt to reference field of non-structure array.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/setting-status-bar-text#comment-358566</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Thu, 08 Oct 2015 17:42:10 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=465#comment-358566</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/setting-status-bar-text#comment-358559&quot;&gt;Jules-Florent EYA&lt;/a&gt;.

this is probably because you have not ensured that the figure window is fully displayed when you reach that code line. Adding &lt;i&gt;&lt;b&gt;drawnow&lt;/b&gt;&lt;/i&gt; and &lt;i&gt;&lt;b&gt;pause(0.5)&lt;/b&gt;&lt;/i&gt; should solve this: http://undocumentedmatlab.com/blog/matlab-and-the-event-dispatch-thread-edt]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/setting-status-bar-text#comment-358559">Jules-Florent EYA</a>.</p>
<p>this is probably because you have not ensured that the figure window is fully displayed when you reach that code line. Adding <i><b>drawnow</b></i> and <i><b>pause(0.5)</b></i> should solve this: <a href="http://undocumentedmatlab.com/blog/matlab-and-the-event-dispatch-thread-edt" rel="ugc">http://undocumentedmatlab.com/blog/matlab-and-the-event-dispatch-thread-edt</a></p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Jules-Florent EYA		</title>
		<link>https://undocumentedmatlab.com/articles/setting-status-bar-text#comment-358559</link>

		<dc:creator><![CDATA[Jules-Florent EYA]]></dc:creator>
		<pubDate>Thu, 08 Oct 2015 15:51:34 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=465#comment-358559</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/setting-status-bar-text#comment-358479&quot;&gt;Yair Altman&lt;/a&gt;.

Unfortunately Yair,

I tried the following code :
&lt;pre lang=&#039;matlab&#039;&gt;
try
   % This works up to R2011a
   jRootPane = jFrame.fFigureClient.getWindow;
catch
   try
      % This works from R2008b and up, up to HG2
      jRootPane = jFrame.fHG1Client.getWindow;
   catch
      % This works in HG2
      jRootPane = jFrame.fHG2Client.getWindow;
   end
end
&lt;/pre&gt;

And the error that is have is now : Attempt to reference field of non-structure array.
It is because JRootPane is empty.

(I use the R2014b Matlab version)]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/setting-status-bar-text#comment-358479">Yair Altman</a>.</p>
<p>Unfortunately Yair,</p>
<p>I tried the following code :</p>
<pre lang='matlab'>
try
   % This works up to R2011a
   jRootPane = jFrame.fFigureClient.getWindow;
catch
   try
      % This works from R2008b and up, up to HG2
      jRootPane = jFrame.fHG1Client.getWindow;
   catch
      % This works in HG2
      jRootPane = jFrame.fHG2Client.getWindow;
   end
end
</pre>
<p>And the error that is have is now : Attempt to reference field of non-structure array.<br />
It is because JRootPane is empty.</p>
<p>(I use the R2014b Matlab version)</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/setting-status-bar-text#comment-358479</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Wed, 07 Oct 2015 19:17:53 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=465#comment-358479</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/setting-status-bar-text#comment-358477&quot;&gt;Jules-Florent EYA&lt;/a&gt;.

@Jules - see item #2 here: http://undocumentedmatlab.com/blog/hg2-update#observations]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/setting-status-bar-text#comment-358477">Jules-Florent EYA</a>.</p>
<p>@Jules &#8211; see item #2 here: <a href="http://undocumentedmatlab.com/blog/hg2-update#observations" rel="ugc">http://undocumentedmatlab.com/blog/hg2-update#observations</a></p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Jules-Florent EYA		</title>
		<link>https://undocumentedmatlab.com/articles/setting-status-bar-text#comment-358477</link>

		<dc:creator><![CDATA[Jules-Florent EYA]]></dc:creator>
		<pubDate>Wed, 07 Oct 2015 18:53:05 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=465#comment-358477</guid>

					<description><![CDATA[Thank you Mr. Altman for sharing with us the result of your research.
I have an issue that I do not understand:

In my code I use the two lines that you provided above : 
&lt;pre lang=&#039;matlab&#039;&gt;
jFrame = get(hFig,&#039;JavaFrame&#039;);
jRootPane = jFrame.fFigureClient.getWindow;
&lt;/pre&gt;

Unfortunately I have the following error :

&lt;pre lang=&#039;text&#039;&gt;No appropriate method, property, or field fFigureClient for class com.mathworks.hg.peer.HG2FigurePeer.&lt;/pre&gt;

The version of Matlab that I use is R2014b]]></description>
			<content:encoded><![CDATA[<p>Thank you Mr. Altman for sharing with us the result of your research.<br />
I have an issue that I do not understand:</p>
<p>In my code I use the two lines that you provided above : </p>
<pre lang='matlab'>
jFrame = get(hFig,'JavaFrame');
jRootPane = jFrame.fFigureClient.getWindow;
</pre>
<p>Unfortunately I have the following error :</p>
<pre lang='text'>No appropriate method, property, or field fFigureClient for class com.mathworks.hg.peer.HG2FigurePeer.</pre>
<p>The version of Matlab that I use is R2014b</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Luis Camilo		</title>
		<link>https://undocumentedmatlab.com/articles/setting-status-bar-text#comment-343871</link>

		<dc:creator><![CDATA[Luis Camilo]]></dc:creator>
		<pubDate>Mon, 12 Jan 2015 02:27:18 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=465#comment-343871</guid>

					<description><![CDATA[Yair, How can I do that the background is transparent? Thanks.]]></description>
			<content:encoded><![CDATA[<p>Yair, How can I do that the background is transparent? Thanks.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Andrei Veldman		</title>
		<link>https://undocumentedmatlab.com/articles/setting-status-bar-text#comment-324908</link>

		<dc:creator><![CDATA[Andrei Veldman]]></dc:creator>
		<pubDate>Thu, 15 May 2014 17:15:52 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=465#comment-324908</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/setting-status-bar-text#comment-324882&quot;&gt;Yair Altman&lt;/a&gt;.

Your solution works perfectly!

P.S. I always find coincidences unsettling, like you having already posted a week ago the solution to the problem which I encountered only yesterday! Makes one wonder...]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/setting-status-bar-text#comment-324882">Yair Altman</a>.</p>
<p>Your solution works perfectly!</p>
<p>P.S. I always find coincidences unsettling, like you having already posted a week ago the solution to the problem which I encountered only yesterday! Makes one wonder&#8230;</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/setting-status-bar-text#comment-324882</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Thu, 15 May 2014 06:35:16 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=465#comment-324882</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/setting-status-bar-text#comment-324871&quot;&gt;Andrei Veldman&lt;/a&gt;.

@Andrei - see my article from last week: 
http://undocumentedmatlab.com/blog/matlab-callbacks-for-java-events-in-r2014a]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/setting-status-bar-text#comment-324871">Andrei Veldman</a>.</p>
<p>@Andrei &#8211; see my article from last week:<br />
<a href="http://undocumentedmatlab.com/blog/matlab-callbacks-for-java-events-in-r2014a" rel="ugc">http://undocumentedmatlab.com/blog/matlab-callbacks-for-java-events-in-r2014a</a></p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Andrei Veldman		</title>
		<link>https://undocumentedmatlab.com/articles/setting-status-bar-text#comment-324871</link>

		<dc:creator><![CDATA[Andrei Veldman]]></dc:creator>
		<pubDate>Wed, 14 May 2014 23:43:24 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=465#comment-324871</guid>

					<description><![CDATA[Shalom Yair,

A while ago I wrote a little Matlab utility which uses your brilliant &quot;statusbar&quot; utility from the File Exchange. I was getting the handle returned by &quot;statusbar&quot; (which is of type &#039;&lt;code&gt;com.mathworks.mwswing.MJStatusBar&lt;/code&gt;&#039;) and then I was setting its &#039;&lt;b&gt;ToolTipText&lt;/b&gt;&#039; and &#039;&lt;b&gt;MouseClickedCallback&lt;/b&gt;&#039; properties. The code looks like this:

&lt;pre lang=&#039;matlab&#039;&gt;set(sb.TextPanel, &#039;ToolTipText&#039;, sToolTip, &#039;MouseClickedCallback&#039;, @TestStatusBarCallback)&lt;/pre&gt;

This used to work just fine in the past, but in more recent versions of Matlab (e.g. R2014a) I&#039;m getting the following error:

&lt;code&gt;The name &#039;MouseClickedCallback&#039; is not an accessible property for an instance of class &#039;com.mathworks.mwswing.MJStatusBar$1&#039;.&lt;/code&gt;

I&#039;m guessing they have changed the way one sets up a callback for a mouse click on the status bar. Could you let me know how this is done these days?

Thanks,
Andrei V]]></description>
			<content:encoded><![CDATA[<p>Shalom Yair,</p>
<p>A while ago I wrote a little Matlab utility which uses your brilliant &#8220;statusbar&#8221; utility from the File Exchange. I was getting the handle returned by &#8220;statusbar&#8221; (which is of type &#8216;<code>com.mathworks.mwswing.MJStatusBar</code>&#8216;) and then I was setting its &#8216;<b>ToolTipText</b>&#8216; and &#8216;<b>MouseClickedCallback</b>&#8216; properties. The code looks like this:</p>
<pre lang='matlab'>set(sb.TextPanel, 'ToolTipText', sToolTip, 'MouseClickedCallback', @TestStatusBarCallback)</pre>
<p>This used to work just fine in the past, but in more recent versions of Matlab (e.g. R2014a) I&#8217;m getting the following error:</p>
<p><code>The name 'MouseClickedCallback' is not an accessible property for an instance of class 'com.mathworks.mwswing.MJStatusBar$1'.</code></p>
<p>I&#8217;m guessing they have changed the way one sets up a callback for a mouse click on the status bar. Could you let me know how this is done these days?</p>
<p>Thanks,<br />
Andrei V</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
