<?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: Customizing help popup contents</title> <atom:link href="http://undocumentedmatlab.com/blog/customizing-help-popup-contents/feed/" rel="self" type="application/rss+xml" /><link>http://undocumentedmatlab.com/blog/customizing-help-popup-contents/</link> <description>Charting Matlab's unsupported hidden underbelly</description> <lastBuildDate>Fri, 18 May 2012 13:56:51 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.1.1</generator> <item><title>By: Nathan</title><link>http://undocumentedmatlab.com/blog/customizing-help-popup-contents/#comment-6512</link> <dc:creator>Nathan</dc:creator> <pubDate>Thu, 28 Jan 2010 00:08:48 +0000</pubDate> <guid
isPermaLink="false">http://undocumentedmatlab.com/?p=819#comment-6512</guid> <description>I am not using GUIDE (as implied by &quot;coding by hand&quot;), but your getClient() method worked for me. Thanks for the quick response and your help. This website is very insightful.-Nathan</description> <content:encoded><![CDATA[<p>I am not using GUIDE (as implied by &#8220;coding by hand&#8221;), but your getClient() method worked for me. Thanks for the quick response and your help. This website is very insightful.</p><p>-Nathan</p> ]]></content:encoded> </item> <item><title>By: Yair Altman</title><link>http://undocumentedmatlab.com/blog/customizing-help-popup-contents/#comment-6510</link> <dc:creator>Yair Altman</dc:creator> <pubDate>Wed, 27 Jan 2010 23:40:57 +0000</pubDate> <guid
isPermaLink="false">http://undocumentedmatlab.com/?p=819#comment-6510</guid> <description>@Nathan - I assume you haven&#039;t placed this in your GUIDE-generated _OpeningFcn(), as explained &lt;a target=&quot;_blank&quot; href=&quot;http://undocumentedmatlab.com/blog/findjobj-find-underlying-java-object/comment-page-1/#comment-6079&quot; rel=&quot;nofollow&quot;&gt;elsewhere&lt;/a&gt;. Another cause of this might be that when you run the code, jTextArea is still unavailable by the time the &lt;b&gt;&lt;i&gt;javaMethodEDT&lt;/i&gt;&lt;/b&gt; is called. In step-by-step debugging this is not an issue, since there is plenty of time for jTextArea to be set. It is also possible that there is no FocusOwner in the Desktop (unlike the case of step-by-step debugging) - this can be forced using the &lt;b&gt;&lt;i&gt;commandwindow&lt;/i&gt;&lt;/b&gt; function. As a final alternative, try using the getClient() approach to getting the Command-window TextArea, as I explained in my recent &lt;a target=&quot;_blank&quot; href=&quot;http://undocumentedmatlab.com/blog/setprompt-setting-matlab-desktop-prompt/&quot; rel=&quot;nofollow&quot;&gt;&lt;b&gt;&lt;i&gt;setPrompt&lt;/i&gt;&lt;/b&gt; article&lt;/a&gt;:&lt;pre lang=&quot;matlab&quot;&gt;
jDesktop = com.mathworks.mde.desk.MLDesktop.getInstance;
try
cmdWin = jDesktop.getClient(&#039;Command Window&#039;);
jTextArea = cmdWin.getComponent(0).getViewport.getComponent(0);
catch
commandwindow;
jTextArea = jDesktop.getMainFrame.getFocusOwner;
end
&lt;/pre&gt;</description> <content:encoded><![CDATA[<p>@Nathan &#8211; I assume you haven&#8217;t placed this in your GUIDE-generated _OpeningFcn(), as explained <a
target="_blank" href="http://undocumentedmatlab.com/blog/findjobj-find-underlying-java-object/comment-page-1/#comment-6079" rel="nofollow">elsewhere</a>. Another cause of this might be that when you run the code, jTextArea is still unavailable by the time the <b><i>javaMethodEDT</i></b> is called. In step-by-step debugging this is not an issue, since there is plenty of time for jTextArea to be set. It is also possible that there is no FocusOwner in the Desktop (unlike the case of step-by-step debugging) &#8211; this can be forced using the <b><i>commandwindow</i></b> function. As a final alternative, try using the getClient() approach to getting the Command-window TextArea, as I explained in my recent <a
target="_blank" href="http://undocumentedmatlab.com/blog/setprompt-setting-matlab-desktop-prompt/" rel="nofollow"><b><i>setPrompt</i></b> article</a>:</p><div
class="wp_syntax"><div
class="code"><pre class="matlab" style="font-family:monospace;">jDesktop = com.<span style="">mathworks</span>.<span style="">mde</span>.<span style="">desk</span>.<span style="">MLDesktop</span>.<span style="">getInstance</span>;
<span style="color: #0000FF;">try</span>
  cmdWin = jDesktop.<span style="">getClient</span><span style="color: #080;">&#40;</span><span style="color:#A020F0;">'Command Window'</span><span style="color: #080;">&#41;</span>;
  jTextArea = cmdWin.<span style="">getComponent</span><span style="color: #080;">&#40;</span><span style="color: #33f;">0</span><span style="color: #080;">&#41;</span>.<span style="">getViewport</span>.<span style="">getComponent</span><span style="color: #080;">&#40;</span><span style="color: #33f;">0</span><span style="color: #080;">&#41;</span>;
<span style="color: #0000FF;">catch</span>
  commandwindow;
  jTextArea = jDesktop.<span style="">getMainFrame</span>.<span style="">getFocusOwner</span>;
<span style="color: #0000FF;">end</span></pre></div></div>]]></content:encoded> </item> <item><title>By: Nathan</title><link>http://undocumentedmatlab.com/blog/customizing-help-popup-contents/#comment-6509</link> <dc:creator>Nathan</dc:creator> <pubDate>Wed, 27 Jan 2010 23:18:51 +0000</pubDate> <guid
isPermaLink="false">http://undocumentedmatlab.com/?p=819#comment-6509</guid> <description>I&#039;m having troubles using this in a GUI that I&#039;m coding by hand.
As a &quot;help&quot; pushbutton callback, I have the following code:
&lt;pre lang=&quot;matlab&quot;&gt;
function [] = pb_call5(varargin)
jDesktop = com.mathworks.mde.desk.MLDesktop.getInstance;
jClassName = &#039;com.mathworks.mlwidgets.help.HelpPopup&#039;;
jPosition = java.awt.Rectangle(200,200,650,600);
jTextArea = jDesktop.getMainFrame.getFocusOwner;
helpTopic = &#039;LiqVapGui&#039;;
javaMethodEDT(&#039;showHelp&#039;,jClassName,jTextArea,[],jPosition,helpTopic);
end
&lt;/pre&gt;However, I am receiving an error stating that
&quot;??? Error using ==&gt; javaMethodEDT
Java exception occurred:
java.lang.IllegalArgumentException: &#039;parent&#039; cannot be null&quot;When stepping through the debugger, I find that jTextArea is empty. However, if I re-type that line while in debug mode, it works just fine. Do you know any way that I can fix this problem?-Nathan</description> <content:encoded><![CDATA[<p>I&#8217;m having troubles using this in a GUI that I&#8217;m coding by hand.<br
/> As a &#8220;help&#8221; pushbutton callback, I have the following code:</p><div
class="wp_syntax"><div
class="code"><pre class="matlab" style="font-family:monospace;"><span style="color: #0000FF;">function</span> <span style="color: #080;">&#91;</span><span style="color: #080;">&#93;</span> = pb_call5<span style="color: #080;">&#40;</span><span style="color: #0000FF;">varargin</span><span style="color: #080;">&#41;</span>
  jDesktop = com.<span style="">mathworks</span>.<span style="">mde</span>.<span style="">desk</span>.<span style="">MLDesktop</span>.<span style="">getInstance</span>;
  jClassName = <span style="color:#A020F0;">'com.mathworks.mlwidgets.help.HelpPopup'</span>;
  jPosition = java.<span style="">awt</span>.<span style="color: #0000FF;">Rectangle</span><span style="color: #080;">&#40;</span><span style="color: #33f;">200</span>,<span style="color: #33f;">200</span>,<span style="color: #33f;">650</span>,<span style="color: #33f;">600</span><span style="color: #080;">&#41;</span>;
  jTextArea = jDesktop.<span style="">getMainFrame</span>.<span style="">getFocusOwner</span>;
  helpTopic = <span style="color:#A020F0;">'LiqVapGui'</span>;
  javaMethodEDT<span style="color: #080;">&#40;</span><span style="color:#A020F0;">'showHelp'</span>,jClassName,jTextArea,<span style="color: #080;">&#91;</span><span style="color: #080;">&#93;</span>,jPosition,helpTopic<span style="color: #080;">&#41;</span>;
<span style="color: #0000FF;">end</span></pre></div></div><p>However, I am receiving an error stating that<br
/> &#8220;??? Error using ==&gt; javaMethodEDT<br
/> Java exception occurred:<br
/> java.lang.IllegalArgumentException: &#8216;parent&#8217; cannot be null&#8221;</p><p>When stepping through the debugger, I find that jTextArea is empty. However, if I re-type that line while in debug mode, it works just fine. Do you know any way that I can fix this problem?</p><p>-Nathan</p> ]]></content:encoded> </item> <item><title>By: Yair Altman</title><link>http://undocumentedmatlab.com/blog/customizing-help-popup-contents/#comment-4832</link> <dc:creator>Yair Altman</dc:creator> <pubDate>Tue, 01 Dec 2009 22:13:13 +0000</pubDate> <guid
isPermaLink="false">http://undocumentedmatlab.com/?p=819#comment-4832</guid> <description>1. This was due to a change in the way Matlab implemented the internal browser component in R2009. This only has an effect on highlighted words  of a &lt;b&gt;&lt;i&gt;doc&lt;/i&gt;&lt;/b&gt; page, not any other &lt;b&gt;&lt;i&gt;popupPanel&lt;/i&gt;&lt;/b&gt; functionality. Anyway, I have uploaded a fixed version which should be available for download by tomorrow (depending on MathWorks workload...).2. I don&#039;t know a way around using the desktop or m-editor reference.- Yair</description> <content:encoded><![CDATA[<p>1. This was due to a change in the way Matlab implemented the internal browser component in R2009. This only has an effect on highlighted words  of a <b><i>doc</i></b> page, not any other <b><i>popupPanel</i></b> functionality. Anyway, I have uploaded a fixed version which should be available for download by tomorrow (depending on MathWorks workload&#8230;).</p><p>2. I don&#8217;t know a way around using the desktop or m-editor reference.</p><p>- Yair</p> ]]></content:encoded> </item> <item><title>By: Dani</title><link>http://undocumentedmatlab.com/blog/customizing-help-popup-contents/#comment-4820</link> <dc:creator>Dani</dc:creator> <pubDate>Tue, 01 Dec 2009 15:45:34 +0000</pubDate> <guid
isPermaLink="false">http://undocumentedmatlab.com/?p=819#comment-4820</guid> <description>Fantastic - thanks a lot for this!Two problems:1. The popupPanel(&#039;surf&#039;) call leads to the following error on my machine:
&lt;pre lang=&quot;matlab&quot;&gt;
??? popupPanel: No appropriate method, property, or field
getHTMLRenderer for class com.mathworks.mlwidgets.html.HTMLRendererError in ==&gt; popupPanel at 127
contents = browser.getHTMLRenderer.getHtmlText;
&lt;/pre&gt;
Works as expected for all the other ways of calling it.2. In compiled mode the Matlab desktop is not accessible. So the following lines cause problems:
&lt;pre lang=&quot;matlab&quot;&gt;
jDesktop = com.mathworks.mde.desk.MLDesktop.getInstance;
jTextArea = jDesktop.getMainFrame.getFocusOwner;
&lt;/pre&gt;
Is it possible to get around this?Dani</description> <content:encoded><![CDATA[<p>Fantastic &#8211; thanks a lot for this!</p><p>Two problems:</p><p>1. The popupPanel(&#8216;surf&#8217;) call leads to the following error on my machine:</p><div
class="wp_syntax"><div
class="code"><pre class="matlab" style="font-family:monospace;">??? popupPanel<span style="color: #F0F;">:</span> No appropriate method, property, or field 
getHTMLRenderer <span style="color: #0000FF;">for</span> <span style="color: #0000FF;">class</span> com.<span style="">mathworks</span>.<span style="">mlwidgets</span>.<span style="">html</span>.<span style="">HTMLRenderer</span>
&nbsp;
<span style="color: #0000FF;">Error</span> in ==&gt; popupPanel at <span style="color: #33f;">127</span>
        contents = browser.<span style="">getHTMLRenderer</span>.<span style="">getHtmlText</span>;</pre></div></div><p>Works as expected for all the other ways of calling it.</p><p>2. In compiled mode the Matlab desktop is not accessible. So the following lines cause problems:</p><div
class="wp_syntax"><div
class="code"><pre class="matlab" style="font-family:monospace;">jDesktop = com.<span style="">mathworks</span>.<span style="">mde</span>.<span style="">desk</span>.<span style="">MLDesktop</span>.<span style="">getInstance</span>;
jTextArea = jDesktop.<span style="">getMainFrame</span>.<span style="">getFocusOwner</span>;</pre></div></div><p>Is it possible to get around this?</p><p>Dani</p> ]]></content:encoded> </item> </channel> </rss>

<!-- W3 Total Cache: Minify debug info:
Engine:             disk: basic
Theme:              b7666
Template:           single
-->
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Served from: undocumentedmatlab.com @ 2012-05-18 22:23:52 -->

<!-- W3 Total Cache: Page cache debug info:
Engine:             disk: enhanced
Cache key:          blog/customizing-help-popup-contents/feed/_index.xml_gzip
Caching:            enabled
Status:             not cached
Creation Time:      1.010s
Header info:
X-Pingback:         http://undocumentedmatlab.com/blog/xmlrpc.php
Set-Cookie:         wpgb_visit_last_php-default=1337405031; expires=Sun, 19-May-2013 05:23:51 GMT; path=/
Link:               <http://undocumentedmatlab.com/?p=819>; rel=shortlink
Content-Type:       text/xml; charset=UTF-8
Last-Modified:      Sat, 19 May 2012 05:23:52 GMT
Vary:               Accept-Encoding, Cookie
Expires:            Sat, 19 May 2012 06:23:52 GMT
Pragma:             public
Cache-Control:      public, must-revalidate, proxy-revalidate
Etag:               6a96de9a651ff0980108ef23593892c2
Content-Encoding:   gzip
-->
