<?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 uiundo	</title>
	<atom:link href="https://undocumentedmatlab.com/articles/customizing-uiundo/feed" rel="self" type="application/rss+xml" />
	<link>https://undocumentedmatlab.com/articles/customizing-uiundo?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=customizing-uiundo</link>
	<description>Professional Matlab consulting, development and training</description>
	<lastBuildDate>Fri, 20 Jul 2018 08:53:21 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.3</generator>
	<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/customizing-uiundo#comment-432953</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Fri, 20 Jul 2018 08:53:21 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=708#comment-432953</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/customizing-uiundo#comment-432952&quot;&gt;Veena Gujjar&lt;/a&gt;.

Veena - After you execute the undo function, of course the undo stack will be empty because the undo command was already executed.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/customizing-uiundo#comment-432952">Veena Gujjar</a>.</p>
<p>Veena &#8211; After you execute the undo function, of course the undo stack will be empty because the undo command was already executed.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Veena Gujjar		</title>
		<link>https://undocumentedmatlab.com/articles/customizing-uiundo#comment-432952</link>

		<dc:creator><![CDATA[Veena Gujjar]]></dc:creator>
		<pubDate>Fri, 20 Jul 2018 08:21:05 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=708#comment-432952</guid>

					<description><![CDATA[Hello Yair,

Can you please help me. I am using matlab 2017b.

I am using uiundo function for undo and redo feature. when the debugger is inside the uiundo function i can see UndoStack has the value.

but once i come out of uiundo function and execute below code:
&lt;pre lang=&quot;matlab&quot;&gt;
% Retrieve redo/undo object
undoObj = getappdata(hFig,&#039;uitools_FigureToolManager&#039;);
if isempty(undoObj)
   try
      % R2014a and earlier
      undoObj = uitools.FigureToolManager(hFig);
   catch
      % R2014b and newer
      undoObj = matlab.uitools.internal.FigureToolManager(hFig);
   end
   setappdata(hFig,&#039;uitools_FigureToolManager&#039;,undoObj);
end

undoObj.CommandManager.peekundo
&lt;/pre&gt;
undostack is empty. Can you please help me to resolve the issue.]]></description>
			<content:encoded><![CDATA[<p>Hello Yair,</p>
<p>Can you please help me. I am using matlab 2017b.</p>
<p>I am using uiundo function for undo and redo feature. when the debugger is inside the uiundo function i can see UndoStack has the value.</p>
<p>but once i come out of uiundo function and execute below code:</p>
<pre lang="matlab">
% Retrieve redo/undo object
undoObj = getappdata(hFig,'uitools_FigureToolManager');
if isempty(undoObj)
   try
      % R2014a and earlier
      undoObj = uitools.FigureToolManager(hFig);
   catch
      % R2014b and newer
      undoObj = matlab.uitools.internal.FigureToolManager(hFig);
   end
   setappdata(hFig,'uitools_FigureToolManager',undoObj);
end

undoObj.CommandManager.peekundo
</pre>
<p>undostack is empty. Can you please help me to resolve the issue.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/customizing-uiundo#comment-353415</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Tue, 21 Jul 2015 10:17:29 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=708#comment-353415</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/customizing-uiundo#comment-353414&quot;&gt;John&lt;/a&gt;.

@John - I think you mean R2014b, not R2014a. In 14b the entire graphics engine changed (HG2) so this is not surprising. I updated the main post, but here is the relevant fix:
&lt;pre lang=&#039;matlab&#039;&gt;
try
   % R2014a and earlier
   undoObj = uitools.FigureToolManager(hFig);
catch
   % R2014b and newer
   undoObj = matlab.uitools.internal.FigureToolManager(hFig);
end
&lt;/pre&gt;]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/customizing-uiundo#comment-353414">John</a>.</p>
<p>@John &#8211; I think you mean R2014b, not R2014a. In 14b the entire graphics engine changed (HG2) so this is not surprising. I updated the main post, but here is the relevant fix:</p>
<pre lang='matlab'>
try
   % R2014a and earlier
   undoObj = uitools.FigureToolManager(hFig);
catch
   % R2014b and newer
   undoObj = matlab.uitools.internal.FigureToolManager(hFig);
end
</pre>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: John		</title>
		<link>https://undocumentedmatlab.com/articles/customizing-uiundo#comment-353414</link>

		<dc:creator><![CDATA[John]]></dc:creator>
		<pubDate>Tue, 21 Jul 2015 09:45:09 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=708#comment-353414</guid>

					<description><![CDATA[Hello Yair,

thank you for your great guide! I implemented a redo/undo functionality in a small tool a couple of years ago, and it worked great ... until now. Unfortunately, newer Matlab versions than 2014a don&#039;t have the &lt;i&gt;uitools_FigureToolManager&lt;/i&gt; object anymore, and I couldn&#039;t find any alternatives. Do you (or anybody else) know if just the location has changed, or has the object completely been removed? Are there already any alternatives found to access Matlab&#039;s redo/undo manager?

Best regards]]></description>
			<content:encoded><![CDATA[<p>Hello Yair,</p>
<p>thank you for your great guide! I implemented a redo/undo functionality in a small tool a couple of years ago, and it worked great &#8230; until now. Unfortunately, newer Matlab versions than 2014a don&#8217;t have the <i>uitools_FigureToolManager</i> object anymore, and I couldn&#8217;t find any alternatives. Do you (or anybody else) know if just the location has changed, or has the object completely been removed? Are there already any alternatives found to access Matlab&#8217;s redo/undo manager?</p>
<p>Best regards</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/customizing-uiundo#comment-9159</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Tue, 20 Apr 2010 16:01:35 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=708#comment-9159</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/customizing-uiundo#comment-9155&quot;&gt;Jason McMains&lt;/a&gt;.

@Jason - when you undo steps, you first need to undo all the actions that followed your desired undo-action, because they might affect the way your undone action behaves. Effectively, you are unrolling the actions at the exact reverse order in which they happened. If you look at any program with an undo list, they all behave the same way (try any editor, for example). I actually think it&#039;s very intuitive.

Regarding the scrollable undo/redo lists - see the &lt;a target=&quot;_blank&quot; href=&quot;http://undocumentedmatlab.com/blog/uiundo-matlab-undocumented-undo-redo-manager/&quot; rel=&quot;nofollow&quot;&gt;previous post&lt;/a&gt; for an example. The scrollbar appears automatically when more than 8 list items are available. This is standard JComboBox behavior (the number 8 is a modifiable property of the JComboBox).]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/customizing-uiundo#comment-9155">Jason McMains</a>.</p>
<p>@Jason &#8211; when you undo steps, you first need to undo all the actions that followed your desired undo-action, because they might affect the way your undone action behaves. Effectively, you are unrolling the actions at the exact reverse order in which they happened. If you look at any program with an undo list, they all behave the same way (try any editor, for example). I actually think it&#8217;s very intuitive.</p>
<p>Regarding the scrollable undo/redo lists &#8211; see the <a target="_blank" href="http://undocumentedmatlab.com/blog/uiundo-matlab-undocumented-undo-redo-manager/" rel="nofollow">previous post</a> for an example. The scrollbar appears automatically when more than 8 list items are available. This is standard JComboBox behavior (the number 8 is a modifiable property of the JComboBox).</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Jason McMains		</title>
		<link>https://undocumentedmatlab.com/articles/customizing-uiundo#comment-9155</link>

		<dc:creator><![CDATA[Jason McMains]]></dc:creator>
		<pubDate>Tue, 20 Apr 2010 12:12:20 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=708#comment-9155</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/customizing-uiundo#comment-9153&quot;&gt;Jason McMains&lt;/a&gt;.

Sorry for more updates, but here is my current solution

&lt;pre lang=&quot;matlab&quot;&gt;for i=length(undoObj.CommandManager.UndoStack):-1:num
   undoObj.CommandManager.undo;
end&lt;/pre&gt;

This does what I need, but it requires cycling through all the previous changes. I&#039;d rather just skip to the desired step, because for my gui, this process is pretty slow.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/customizing-uiundo#comment-9153">Jason McMains</a>.</p>
<p>Sorry for more updates, but here is my current solution</p>
<pre lang="matlab">for i=length(undoObj.CommandManager.UndoStack):-1:num
   undoObj.CommandManager.undo;
end</pre>
<p>This does what I need, but it requires cycling through all the previous changes. I&#8217;d rather just skip to the desired step, because for my gui, this process is pretty slow.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Jason McMains		</title>
		<link>https://undocumentedmatlab.com/articles/customizing-uiundo#comment-9153</link>

		<dc:creator><![CDATA[Jason McMains]]></dc:creator>
		<pubDate>Tue, 20 Apr 2010 11:47:58 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=708#comment-9153</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/customizing-uiundo#comment-9152&quot;&gt;Jason McMains&lt;/a&gt;.

small update: I&#039;ve gotten this to work partially by using:

&lt;pre lang=&quot;matlab&quot;&gt;undoObj.CommandManager.UndoStack(num).execute;&lt;/pre&gt;

but the undoObj structure wont update to reflect the changes.

Thanks Again]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/customizing-uiundo#comment-9152">Jason McMains</a>.</p>
<p>small update: I&#8217;ve gotten this to work partially by using:</p>
<pre lang="matlab">undoObj.CommandManager.UndoStack(num).execute;</pre>
<p>but the undoObj structure wont update to reflect the changes.</p>
<p>Thanks Again</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Jason McMains		</title>
		<link>https://undocumentedmatlab.com/articles/customizing-uiundo#comment-9152</link>

		<dc:creator><![CDATA[Jason McMains]]></dc:creator>
		<pubDate>Tue, 20 Apr 2010 11:21:08 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=708#comment-9152</guid>

					<description><![CDATA[Hey Yair,
I&#039;m trying to implement this in a GUI, and I have the basic functionality working, but I&#039;m having trouble jumping to an undo point earlier than the most recent, i.e. if there are 5 possible undo actions, I would like to jump to the 3rd or 4th instead of the last. 

Also, Do you know how to create the list box used in the function button or the cell button in the editor? its a context menu with a scroll bar on the side. I&#039;d like to use that functionality for an undo dropdown.

Thanks for any help!
Jason]]></description>
			<content:encoded><![CDATA[<p>Hey Yair,<br />
I&#8217;m trying to implement this in a GUI, and I have the basic functionality working, but I&#8217;m having trouble jumping to an undo point earlier than the most recent, i.e. if there are 5 possible undo actions, I would like to jump to the 3rd or 4th instead of the last. </p>
<p>Also, Do you know how to create the list box used in the function button or the cell button in the editor? its a context menu with a scroll bar on the side. I&#8217;d like to use that functionality for an undo dropdown.</p>
<p>Thanks for any help!<br />
Jason</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Venkat		</title>
		<link>https://undocumentedmatlab.com/articles/customizing-uiundo#comment-4345</link>

		<dc:creator><![CDATA[Venkat]]></dc:creator>
		<pubDate>Wed, 11 Nov 2009 14:14:08 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=708#comment-4345</guid>

					<description><![CDATA[Hi Yair,
Can you please answer my query at 
http://groups.google.com/group/comp.soft-sys.matlab/browse_thread/thread/8bba37279a78b926#

sorry for the irrevalent post here

thanks]]></description>
			<content:encoded><![CDATA[<p>Hi Yair,<br />
Can you please answer my query at<br />
<a href="http://groups.google.com/group/comp.soft-sys.matlab/browse_thread/thread/8bba37279a78b926#" rel="nofollow ugc">http://groups.google.com/group/comp.soft-sys.matlab/browse_thread/thread/8bba37279a78b926#</a></p>
<p>sorry for the irrevalent post here</p>
<p>thanks</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
