<?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: Hierarchical Systems with UDD	</title>
	<atom:link href="https://undocumentedmatlab.com/articles/hierarchical-systems-with-udd/feed" rel="self" type="application/rss+xml" />
	<link>https://undocumentedmatlab.com/articles/hierarchical-systems-with-udd?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=hierarchical-systems-with-udd</link>
	<description>Professional Matlab consulting, development and training</description>
	<lastBuildDate>Tue, 21 Oct 2014 20:50:36 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.2</generator>
	<item>
		<title>
		By: Matt S		</title>
		<link>https://undocumentedmatlab.com/articles/hierarchical-systems-with-udd#comment-334765</link>

		<dc:creator><![CDATA[Matt S]]></dc:creator>
		<pubDate>Tue, 21 Oct 2014 20:50:36 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=2146#comment-334765</guid>

					<description><![CDATA[Hi,

I am trying to create a simple UDD class similar to this.  The class is the same as simple.object with simple.object being a subclass of uipanel.  I am trying to include a uicontrol slider on the panel during construction.  When I open up Matlab, the first time I run the constructor, I always get the error: The class name &#039;ScrollablePanel&#039; already exists.  If I run it again, it works without error.  Is there a way I can make it work the first time?  If it helps, here is the constructor:
&lt;pre lang=&#039;matlab&#039;&gt;
function this = ScrollablePanel(varargin)
   this = uiStrider.ScrollablePanel;
   set(this,varargin{:});
   set(this,&#039;SliderHandle&#039;,uicontrol(&#039;Parent&#039;,handle(this), &#039;Style&#039;,&#039;Slider&#039;,&#039;Units&#039;,&#039;Pixels&#039;));
end
&lt;/pre&gt;

Thanks for doing this website.  I use it all the time,
Matt]]></description>
			<content:encoded><![CDATA[<p>Hi,</p>
<p>I am trying to create a simple UDD class similar to this.  The class is the same as simple.object with simple.object being a subclass of uipanel.  I am trying to include a uicontrol slider on the panel during construction.  When I open up Matlab, the first time I run the constructor, I always get the error: The class name &#8216;ScrollablePanel&#8217; already exists.  If I run it again, it works without error.  Is there a way I can make it work the first time?  If it helps, here is the constructor:</p>
<pre lang='matlab'>
function this = ScrollablePanel(varargin)
   this = uiStrider.ScrollablePanel;
   set(this,varargin{:});
   set(this,'SliderHandle',uicontrol('Parent',handle(this), 'Style','Slider','Units','Pixels'));
end
</pre>
<p>Thanks for doing this website.  I use it all the time,<br />
Matt</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Extending a Java class with UDD &#124; Undocumented Matlab		</title>
		<link>https://undocumentedmatlab.com/articles/hierarchical-systems-with-udd#comment-79490</link>

		<dc:creator><![CDATA[Extending a Java class with UDD &#124; Undocumented Matlab]]></dc:creator>
		<pubDate>Thu, 29 Mar 2012 14:33:01 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=2146#comment-79490</guid>

					<description><![CDATA[[...] In Hierarchical Systems with UDD we briefly noted that a UDD hierarchy may be passed to Java [...]]]></description>
			<content:encoded><![CDATA[<p>[&#8230;] In Hierarchical Systems with UDD we briefly noted that a UDD hierarchy may be passed to Java [&#8230;]</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Sebastian Hölz		</title>
		<link>https://undocumentedmatlab.com/articles/hierarchical-systems-with-udd#comment-36135</link>

		<dc:creator><![CDATA[Sebastian Hölz]]></dc:creator>
		<pubDate>Wed, 09 Mar 2011 09:23:09 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=2146#comment-36135</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/hierarchical-systems-with-udd#comment-36049&quot;&gt;Donn Shull&lt;/a&gt;.

Your example using &#039;PropertyPostSet&#039; works. I thought that this would lead to a racing condition, but it doesn&#039;t. I will work from here on ...

Thanks

Sebastian

PS to  anyone, who wants to try something similar:

1) Define property &quot;PL&quot; (-&#062; PropListener) in schema.m file:

    p = schema.prop(MyClass, &#039;PropListener&#039;, &#039;handle vector&#039;);

2) Specify &#039;PropertyPostSet&#039; listener  and nested function to handle the property change in the MyClass.m - file.

function obj = MyClass(varargin)

obj = MyPackage.MyClass;
obj.PL=handle.listener(obj, obj.findprop(&#039;XLim&#039;), &#039;PropertyPostSet&#039;,@MF);

   function MF(~, in)
      obj.xlim = round(in.NewValue);
   end

end

- The handle to the listener is saved in property &quot;PL&quot;, otherwise the function &quot;MF&quot; would not be called. This is similar to what is done in the &quot;linkprop&quot; command (s. Matlab documentation).

- Since &quot;MF&quot; is specified as nested function, obj is still in scope and the new value (in.NewValue) can be checked, altered and passed to the object.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/hierarchical-systems-with-udd#comment-36049">Donn Shull</a>.</p>
<p>Your example using &#8216;PropertyPostSet&#8217; works. I thought that this would lead to a racing condition, but it doesn&#8217;t. I will work from here on &#8230;</p>
<p>Thanks</p>
<p>Sebastian</p>
<p>PS to  anyone, who wants to try something similar:</p>
<p>1) Define property &#8220;PL&#8221; (-&gt; PropListener) in schema.m file:</p>
<p>    p = schema.prop(MyClass, &#8216;PropListener&#8217;, &#8216;handle vector&#8217;);</p>
<p>2) Specify &#8216;PropertyPostSet&#8217; listener  and nested function to handle the property change in the MyClass.m &#8211; file.</p>
<p>function obj = MyClass(varargin)</p>
<p>obj = MyPackage.MyClass;<br />
obj.PL=handle.listener(obj, obj.findprop(&#8216;XLim&#8217;), &#8216;PropertyPostSet&#8217;,@MF);</p>
<p>   function MF(~, in)<br />
      obj.xlim = round(in.NewValue);<br />
   end</p>
<p>end</p>
<p>&#8211; The handle to the listener is saved in property &#8220;PL&#8221;, otherwise the function &#8220;MF&#8221; would not be called. This is similar to what is done in the &#8220;linkprop&#8221; command (s. Matlab documentation).</p>
<p>&#8211; Since &#8220;MF&#8221; is specified as nested function, obj is still in scope and the new value (in.NewValue) can be checked, altered and passed to the object.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Donn Shull		</title>
		<link>https://undocumentedmatlab.com/articles/hierarchical-systems-with-udd#comment-36049</link>

		<dc:creator><![CDATA[Donn Shull]]></dc:creator>
		<pubDate>Tue, 08 Mar 2011 17:26:16 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=2146#comment-36049</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/hierarchical-systems-with-udd#comment-35971&quot;&gt;Sebastian Hölz&lt;/a&gt;.

@Sebastian - Normally you can overload a propertyof the superclass in a subclass. I think the problem in this case MATLAB will not allow you to set the type of your overloaded XLim property to axesXLimType and no other type will work. XLim does generate Events so you could try something like:

&lt;pre lang=&quot;matlab&quot;&gt;
lis = handle.listener(a, a.findprop(&#039;XLim&#039;), &#039;PropertyPostSet&#039;, &#039;a.XLim = [11,20];&#039;)
&lt;/pre&gt;

To solve your problem.

In the upcoming section on UDD events we will show how to placecode like this in a a class.

Best Regards,

Donn]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/hierarchical-systems-with-udd#comment-35971">Sebastian Hölz</a>.</p>
<p>@Sebastian &#8211; Normally you can overload a propertyof the superclass in a subclass. I think the problem in this case MATLAB will not allow you to set the type of your overloaded XLim property to axesXLimType and no other type will work. XLim does generate Events so you could try something like:</p>
<pre lang="matlab">
lis = handle.listener(a, a.findprop('XLim'), 'PropertyPostSet', 'a.XLim = [11,20];')
</pre>
<p>To solve your problem.</p>
<p>In the upcoming section on UDD events we will show how to placecode like this in a a class.</p>
<p>Best Regards,</p>
<p>Donn</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Sebastian Hölz		</title>
		<link>https://undocumentedmatlab.com/articles/hierarchical-systems-with-udd#comment-35971</link>

		<dc:creator><![CDATA[Sebastian Hölz]]></dc:creator>
		<pubDate>Mon, 07 Mar 2011 22:56:04 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=2146#comment-35971</guid>

					<description><![CDATA[Hi Donn, thanks for this interesting series of articles. It touches a field that I&#039;m currently investigating, but where I can not find a suitable solution yet. 

Simple example:
Suppose I create a UDD-subclass of HG-axes named mAxis and want to be able to restrict the user to certain xlims, e.g. only multiples of 10. How can I intercept a call like
&lt;pre lang=&quot;matlab&quot;&gt;&gt;&gt; set(H, &#039;xlim&#039;, [11 20])   % Where H is a mAxis object&lt;/pre&gt;

On the one hand side, if I make &lt;b&gt;xlim&lt;/b&gt; a property of the class (using &quot;schema.prop ...&quot; in the schema.m-file) and supply the according &lt;b&gt;SetFunction&lt;/b&gt;, I can no longer pass the property to the &quot;superclass&quot;, i.e. the axis object.

On the other hand Matlab will not let me specify a &lt;b&gt;SetFunction&lt;/b&gt; in the mAxis.m, because the &lt;b&gt;xlim&lt;/b&gt; property is protected.

OK, maybe you  can hint me to some solution.

Cheers

Sebastian]]></description>
			<content:encoded><![CDATA[<p>Hi Donn, thanks for this interesting series of articles. It touches a field that I&#8217;m currently investigating, but where I can not find a suitable solution yet. </p>
<p>Simple example:<br />
Suppose I create a UDD-subclass of HG-axes named mAxis and want to be able to restrict the user to certain xlims, e.g. only multiples of 10. How can I intercept a call like</p>
<pre lang="matlab">>> set(H, 'xlim', [11 20])   % Where H is a mAxis object</pre>
<p>On the one hand side, if I make <b>xlim</b> a property of the class (using &#8220;schema.prop &#8230;&#8221; in the schema.m-file) and supply the according <b>SetFunction</b>, I can no longer pass the property to the &#8220;superclass&#8221;, i.e. the axis object.</p>
<p>On the other hand Matlab will not let me specify a <b>SetFunction</b> in the mAxis.m, because the <b>xlim</b> property is protected.</p>
<p>OK, maybe you  can hint me to some solution.</p>
<p>Cheers</p>
<p>Sebastian</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
