<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Why? If the lastEditTimeStamp is unknown (maybe there was no
previous command at all) we create a new one. That variable already
had that meaning. Just check references.<br>
<br>
Cheers,<br>
<br>
On 9/6/2019 12:00 PM, Eric Brandwein wrote:
<blockquote
cite="mid:CA+QgCHpDO3UNB-03cntjPS58pochsvYo-dnsaGC+1V4dG0BUqg@mail.gmail.com"
type="cite">
<div dir="auto">I've just checked it out, and though my solution
is pretty ugly, I'm not entirely convinced by this one either.
There's some time when the lastEditTimeStamp is nil although
there has been a command. If we try to do anything with that
time stamp before calling logUndoAndReplace... we would be
seeing an invalid state. Instead, maybe we could add a new
instance variable to act as a flag, similar to what I was doing
but cleaner, without adding a new collaborator to the message.
It would be similar to your solution too, just using a separate
variable to signal a new command. What do you think?
<div dir="auto"><br>
</div>
<div dir="auto">Cheers,</div>
<div dir="auto">Eric</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">El vie., 6 sep. 2019 11:40,
Juan Vuletich <<a moz-do-not-send="true"
href="mailto:juan@jvuletich.org">juan@jvuletich.org</a>>
escribió:<br>
</div>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">On 9/3/2019 11:46 PM, Eric Brandwein via
Cuis-dev wrote:<br>
> Hi all,<br>
><br>
> Attached is a ChangeSet that makes it so that inserting a
new line on <br>
> the SmalltalkEditor creates a new undoable command, and
so undoing <br>
> only erases up until before the new line. Comments
welcome!<br>
><br>
> Cheers,<br>
> Eric<br>
<br>
Thaks Eric. Now at GitHub. I did some refactoring on this, as
the new <br>
parameter you added recently isn't really needed. Check the
changes if <br>
curious, and ask any questions.<br>
<br>
Cheers,<br>
<br>
-- <br>
Juan Vuletich<br>
<a moz-do-not-send="true" href="http://www.cuis-smalltalk.org"
rel="noreferrer noreferrer" target="_blank">www.cuis-smalltalk.org</a><br>
<a moz-do-not-send="true"
href="https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev"
rel="noreferrer noreferrer" target="_blank">https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev</a><br>
<a moz-do-not-send="true" href="https://github.com/jvuletich"
rel="noreferrer noreferrer" target="_blank">https://github.com/jvuletich</a><br>
<a moz-do-not-send="true"
href="https://www.linkedin.com/in/juan-vuletich-75611b3"
rel="noreferrer noreferrer" target="_blank">https://www.linkedin.com/in/juan-vuletich-75611b3</a><br>
@JuanVuletich<br>
<br>
</blockquote>
</div>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Juan Vuletich
<a class="moz-txt-link-abbreviated" href="http://www.cuis-smalltalk.org">www.cuis-smalltalk.org</a>
<a class="moz-txt-link-freetext" href="https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev">https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev</a>
<a class="moz-txt-link-freetext" href="https://github.com/jvuletich">https://github.com/jvuletich</a>
<a class="moz-txt-link-freetext" href="https://www.linkedin.com/in/juan-vuletich-75611b3">https://www.linkedin.com/in/juan-vuletich-75611b3</a>
@JuanVuletich</pre>
</body>
</html>