[Cuis-dev] Separate undo commands on new line

Juan Vuletich juan at jvuletich.org
Fri Sep 6 10:08:32 PDT 2019


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.

Cheers,

On 9/6/2019 12:00 PM, Eric Brandwein wrote:
> 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?
>
> Cheers,
> Eric
>
> El vie., 6 sep. 2019 11:40, Juan Vuletich <juan at jvuletich.org 
> <mailto:juan at jvuletich.org>> escribió:
>
>     On 9/3/2019 11:46 PM, Eric Brandwein via Cuis-dev wrote:
>     > Hi all,
>     >
>     > Attached is a ChangeSet that makes it so that inserting a new
>     line on
>     > the SmalltalkEditor creates a new undoable command, and so undoing
>     > only erases up until before the new line. Comments welcome!
>     >
>     > Cheers,
>     > Eric
>
>     Thaks Eric. Now at GitHub. I did some refactoring on this, as the new
>     parameter you added recently isn't really needed. Check the
>     changes if
>     curious, and ask any questions.
>
>     Cheers,
>
>     -- 
>     Juan Vuletich
>     www.cuis-smalltalk.org <http://www.cuis-smalltalk.org>
>     https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev
>     https://github.com/jvuletich
>     https://www.linkedin.com/in/juan-vuletich-75611b3
>     @JuanVuletich
>


-- 
Juan Vuletich
www.cuis-smalltalk.org
https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev
https://github.com/jvuletich
https://www.linkedin.com/in/juan-vuletich-75611b3
@JuanVuletich

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20190906/b1ff3e4c/attachment.htm>


More information about the Cuis-dev mailing list