<?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: Context-Sensitive Help</title>
	<atom:link href="http://undocumentedmatlab.com/blog/context-sensitive-help/feed/" rel="self" type="application/rss+xml" />
	<link>http://undocumentedmatlab.com/blog/context-sensitive-help/</link>
	<description>Charting Matlab's unsupported hidden underbelly</description>
	<pubDate>Thu, 11 Mar 2010 19:27:28 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Yair Altman</title>
		<link>http://undocumentedmatlab.com/blog/context-sensitive-help/comment-page-1/#comment-4774</link>
		<dc:creator>Yair Altman</dc:creator>
		<pubDate>Mon, 30 Nov 2009 16:52:05 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=491#comment-4774</guid>
		<description>I have expanded my answer to Dani's question into a full article ( http://undocumentedmatlab.com/blog/customizing-help-popup-contents) and companion utility (&lt;b&gt;&lt;i&gt;popupPanel&lt;/i&gt;&lt;/b&gt; - http://www.mathworks.com/matlabcentral/fileexchange/25975).

Enjoy :-)</description>
		<content:encoded><![CDATA[<p>I have expanded my answer to Dani&#8217;s question into a full article ( <a href="http://undocumentedmatlab.com/blog/customizing-help-popup-contents" rel="nofollow">http://undocumentedmatlab.com/blog/customizing-help-popup-contents</a>) and companion utility (<b><i>popupPanel</i></b> - <a href="http://www.mathworks.com/matlabcentral/fileexchange/25975" rel="nofollow">http://www.mathworks.com/matlabcentral/fileexchange/25975</a>).</p>
<p>Enjoy <img src='http://undocumentedmatlab.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Yair Altman</title>
		<link>http://undocumentedmatlab.com/blog/context-sensitive-help/comment-page-1/#comment-4707</link>
		<dc:creator>Yair Altman</dc:creator>
		<pubDate>Fri, 27 Nov 2009 12:47:41 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=491#comment-4707</guid>
		<description>Dani - yes: you can popup this HelpPopup window using the following:
&lt;pre lang="matlab"&gt;
jDesktop = com.mathworks.mde.desk.MLDesktop.getInstance;
jTextArea = jDesktop.getMainFrame.getFocusOwner;
jClassName = 'com.mathworks.mlwidgets.help.HelpPopup';
jPosition = java.awt.Rectangle(0,0,400,300);
helpTopic = 'surf';
javaMethodEDT('showHelp',jClassName,jTextArea,[],jPosition,helpTopic);
&lt;/pre&gt;
where:
1) jPosition sets popup's pixel size and position (X,Y,Width,Height). Remember that Java counts from the top down (opposite to Matlab) and is 0-based. Therefore, Rectangle(0,0,400,300) is a 400x300 window at the screen's top-left corner.

2) helpTopic is the help topic of your choice (the output of the &lt;b&gt;&lt;i&gt;doc&lt;/i&gt;&lt;/b&gt; function). To display arbitrary text, create an HTML doc page. A much easier alternative is to create a simple .m file that only has a main help comment with your arbitrary text, which will be presented in the popup.
Note: on pre-R2008a releases you need to use the equivalent but more cumbersome &lt;b&gt;&lt;i&gt;awtinvoke&lt;/i&gt;&lt;/b&gt; function instead of &lt;b&gt;&lt;i&gt;javaMethodEDT&lt;/i&gt;&lt;/b&gt;.</description>
		<content:encoded><![CDATA[<p>Dani - yes: you can popup this HelpPopup window using the following:</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>;
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;">0</span>,<span style="color: #33f;">0</span>,<span style="color: #33f;">400</span>,<span style="color: #33f;">300</span><span style="color: #080;">&#41;</span>;
helpTopic = <span style="color:#A020F0;">'surf'</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>;</pre></div></div>

<p>where:<br />
1) jPosition sets popup&#8217;s pixel size and position (X,Y,Width,Height). Remember that Java counts from the top down (opposite to Matlab) and is 0-based. Therefore, Rectangle(0,0,400,300) is a 400&#215;300 window at the screen&#8217;s top-left corner.</p>
<p>2) helpTopic is the help topic of your choice (the output of the <b><i>doc</i></b> function). To display arbitrary text, create an HTML doc page. A much easier alternative is to create a simple .m file that only has a main help comment with your arbitrary text, which will be presented in the popup.<br />
Note: on pre-R2008a releases you need to use the equivalent but more cumbersome <b><i>awtinvoke</i></b> function instead of <b><i>javaMethodEDT</i></b>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dani</title>
		<link>http://undocumentedmatlab.com/blog/context-sensitive-help/comment-page-1/#comment-4691</link>
		<dc:creator>Dani</dc:creator>
		<pubDate>Thu, 26 Nov 2009 19:09:44 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=491#comment-4691</guid>
		<description>Another help viewer is the one that pops up when I click F1 on a marked Matlab keyword  - I like the design of that one the most. Is it possible to (ab)use it and have it pop up with information of my choice? I cannot find out how it is called up.</description>
		<content:encoded><![CDATA[<p>Another help viewer is the one that pops up when I click F1 on a marked Matlab keyword  - I like the design of that one the most. Is it possible to (ab)use it and have it pop up with information of my choice? I cannot find out how it is called up.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason McMains</title>
		<link>http://undocumentedmatlab.com/blog/context-sensitive-help/comment-page-1/#comment-2341</link>
		<dc:creator>Jason McMains</dc:creator>
		<pubDate>Mon, 31 Aug 2009 18:31:46 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=491#comment-2341</guid>
		<description>works great, I had to do alot of modifying of the schema and other mfiles throughout to change uitab to uitab_new, but it was well worth it.</description>
		<content:encoded><![CDATA[<p>works great, I had to do alot of modifying of the schema and other mfiles throughout to change uitab to uitab_new, but it was well worth it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Yair Altman</title>
		<link>http://undocumentedmatlab.com/blog/context-sensitive-help/comment-page-1/#comment-2310</link>
		<dc:creator>Yair Altman</dc:creator>
		<pubDate>Thu, 27 Aug 2009 20:32:10 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=491#comment-2310</guid>
		<description>Jason - you can replicate the entire uitab/uitabgroup code base (m-files and their associated private folders) to a network-accessible central location, which you would then be able to modify.

You'll need to ensure that your Matlab path uses the new location rather than the default one - perhaps the best way to ensure this is to simply rename the files (and associate private folders) to uitab_new/uitabgroup_new, or something similar.</description>
		<content:encoded><![CDATA[<p>Jason - you can replicate the entire uitab/uitabgroup code base (m-files and their associated private folders) to a network-accessible central location, which you would then be able to modify.</p>
<p>You&#8217;ll need to ensure that your Matlab path uses the new location rather than the default one - perhaps the best way to ensure this is to simply rename the files (and associate private folders) to uitab_new/uitabgroup_new, or something similar.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason McMains</title>
		<link>http://undocumentedmatlab.com/blog/context-sensitive-help/comment-page-1/#comment-2309</link>
		<dc:creator>Jason McMains</dc:creator>
		<pubDate>Thu, 27 Aug 2009 18:39:27 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=491#comment-2309</guid>
		<description>@Yair,
Is there a way to reroute where that callback goes to something in the current directory? I'm deploying this on a network, so if others use it, they would have to update that location as well. (plus my company blocks us from modifying the matlab root directory :( )

Thanks Again
Jason</description>
		<content:encoded><![CDATA[<p>@Yair,<br />
Is there a way to reroute where that callback goes to something in the current directory? I&#8217;m deploying this on a network, so if others use it, they would have to update that location as well. (plus my company blocks us from modifying the matlab root directory <img src='http://undocumentedmatlab.com/blog/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> )</p>
<p>Thanks Again<br />
Jason</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Yair Altman</title>
		<link>http://undocumentedmatlab.com/blog/context-sensitive-help/comment-page-1/#comment-2302</link>
		<dc:creator>Yair Altman</dc:creator>
		<pubDate>Thu, 27 Aug 2009 09:58:30 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=491#comment-2302</guid>
		<description>@Jason - the updateVisibility function is an m-file (%matlabroot%\toolbox\matlab\uitools\@uitools\@uitab\updateVisibility.m) that is responsible for hiding the previous tab's components and unhiding the new tab's components, whenever the active tab is changed (selected). Each tab is considered a "child" of the tabgroup and automatically has the updateVisibility() function defined as a private function. It appears that &lt;B&gt;&lt;I&gt;CSHelp &lt;/I&gt;&lt;/B&gt; adds extra children that do not have this updateVisibility() function defined.

I think the simplest workaround is simply to add a try-catch block around the offending line (%matlabroot%\toolbox\matlab\uitools\@uitools\@uitabgroup\schema.m line #211 [for Matlab R2008a]):

&lt;pre lang="matlab"&gt;
    try
        children(i).updateVisibility();
    catch
        % never mind...
    end
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>@Jason - the updateVisibility function is an m-file (%matlabroot%\toolbox\matlab\uitools\@uitools\@uitab\updateVisibility.m) that is responsible for hiding the previous tab&#8217;s components and unhiding the new tab&#8217;s components, whenever the active tab is changed (selected). Each tab is considered a &#8220;child&#8221; of the tabgroup and automatically has the updateVisibility() function defined as a private function. It appears that <b><i>CSHelp </i></b> adds extra children that do not have this updateVisibility() function defined.</p>
<p>I think the simplest workaround is simply to add a try-catch block around the offending line (%matlabroot%\toolbox\matlab\uitools\@uitools\@uitabgroup\schema.m line #211 [for Matlab R2008a]):</p>

<div class="wp_syntax"><div class="code"><pre class="matlab" style="font-family:monospace;">    <span style="color: #0000FF;">try</span>
        children<span style="color: #080;">&#40;</span><span style="color: #33f;">i</span><span style="color: #080;">&#41;</span>.<span style="">updateVisibility</span><span style="color: #080;">&#40;</span><span style="color: #080;">&#41;</span>;
    <span style="color: #0000FF;">catch</span>
        <span style="color: #228B22;">% never mind...</span>
    <span style="color: #0000FF;">end</span></pre></div></div>

]]></content:encoded>
	</item>
	<item>
		<title>By: Andy</title>
		<link>http://undocumentedmatlab.com/blog/context-sensitive-help/comment-page-1/#comment-2144</link>
		<dc:creator>Andy</dc:creator>
		<pubDate>Mon, 17 Aug 2009 13:51:02 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=491#comment-2144</guid>
		<description>Wow, this is great.  I'm not at MATLAB right now, so I can't try this out, but it's good to hear that helpview accepts any HTML file path, since I've spent about a week typing up full 'Help' documentation in HTML to be called via the web function.  But using the web function to open my HTML pages doesn't seem to give me the ability to easily control the help documentation (e.g. close the help window from within the GUI, open the help page to a specific section controlled by the user, etc.).  It sounds like I'll be able to do these things with cshelp and helpview.

Thanks for the detailed response!</description>
		<content:encoded><![CDATA[<p>Wow, this is great.  I&#8217;m not at MATLAB right now, so I can&#8217;t try this out, but it&#8217;s good to hear that helpview accepts any HTML file path, since I&#8217;ve spent about a week typing up full &#8216;Help&#8217; documentation in HTML to be called via the web function.  But using the web function to open my HTML pages doesn&#8217;t seem to give me the ability to easily control the help documentation (e.g. close the help window from within the GUI, open the help page to a specific section controlled by the user, etc.).  It sounds like I&#8217;ll be able to do these things with cshelp and helpview.</p>
<p>Thanks for the detailed response!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason McMains</title>
		<link>http://undocumentedmatlab.com/blog/context-sensitive-help/comment-page-1/#comment-2096</link>
		<dc:creator>Jason McMains</dc:creator>
		<pubDate>Wed, 12 Aug 2009 12:07:44 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=491#comment-2096</guid>
		<description>Yair,
Thanks again, I've been looking for an ability like this for a while. The only thing I will point out is that this seems to have an adverse effect with the tabbed panels. When I turn on CSHelp and try to switch tabs I get the following error:

??? No appropriate method or public field updateVisibility for class hg.hgjavacomponent.

Error in ==&gt; uitools.uitabgroup.schema&gt;onSelChanged at 211
        children(i).updateVisibility();

Any Ideas?
Thanks 
Jason</description>
		<content:encoded><![CDATA[<p>Yair,<br />
Thanks again, I&#8217;ve been looking for an ability like this for a while. The only thing I will point out is that this seems to have an adverse effect with the tabbed panels. When I turn on CSHelp and try to switch tabs I get the following error:</p>
<p>??? No appropriate method or public field updateVisibility for class hg.hgjavacomponent.</p>
<p>Error in ==&gt; uitools.uitabgroup.schema&gt;onSelChanged at 211<br />
        children(i).updateVisibility();</p>
<p>Any Ideas?<br />
Thanks<br />
Jason</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ashish Sadanadnan</title>
		<link>http://undocumentedmatlab.com/blog/context-sensitive-help/comment-page-1/#comment-2006</link>
		<dc:creator>Ashish Sadanadnan</dc:creator>
		<pubDate>Wed, 05 Aug 2009 19:50:24 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=491#comment-2006</guid>
		<description>Hi Yair,
This is completely off topic but you mentioned schema.prop and so I was hoping you'd be able to help with two posts I recently made on CSSM. No one has replied to either yet.

http://tinyurl.com/mt2ncl
http://tinyurl.com/nls6r4

The classes mentioned in the first post are using the schema.m mechanism.

Thanks for your help,
Ashish.</description>
		<content:encoded><![CDATA[<p>Hi Yair,<br />
This is completely off topic but you mentioned schema.prop and so I was hoping you&#8217;d be able to help with two posts I recently made on CSSM. No one has replied to either yet.</p>
<p><a href="http://tinyurl.com/mt2ncl" rel="nofollow">http://tinyurl.com/mt2ncl</a><br />
<a href="http://tinyurl.com/nls6r4" rel="nofollow">http://tinyurl.com/nls6r4</a></p>
<p>The classes mentioned in the first post are using the schema.m mechanism.</p>
<p>Thanks for your help,<br />
Ashish.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
