undo question

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

undo question

Chris Muller-4
Hi Marcel, the new undo is great but I couldn't make it work across
cmd+l (cancelEdits) and cmd+s #accept, because it seems that the
'history' is discarded with the entire 'editor' by process of eagerly
calling #releaseEditor.  I know that was already there forever, but do
you know whether that is really necessary?  Those Editors could just
go away soon enough when the SystemWindow was closed, in the meantime,
the user having access to undo across saves and restores (as modern
text editors do) would be very useful.

Reply | Threaded
Open this post in threaded view
|

Re: undo question

marcel.taeumel
No, I do not know, why the editor is released when accepting changes. However, it makes sense to purge the history of somebody exchanges all the text from the outside. The way it works now, it's quite robust. But there may be situations where we could retain the history such as this save operation.

Best,
Marcel
Reply | Threaded
Open this post in threaded view
|

Re: undo question

Denis Kudriashov

Hi.

What classes I should look to learn new undo implementation? And how it differs from old one?

16 нояб. 2015 г. 7:46 AM пользователь "marcel.taeumel" <[hidden email]> написал:
No, I do not know, why the editor is released when accepting changes.
However, it makes sense to purge the history of somebody exchanges all the
text from the outside. The way it works now, it's quite robust. But there
may be situations where we could retain the history such as this save
operation.

Best,
Marcel



--
View this message in context: http://forum.world.st/undo-question-tp4861160p4861165.html
Sent from the Squeak - Dev mailing list archive at Nabble.com.



Reply | Threaded
Open this post in threaded view
|

Re: undo question

marcel.taeumel
It does not really differ from the old one.

TextEditor >> #openTypeIn (and senders)
TextEditor >> #closeTypeIn (and senders)
TextEditor >> #repalceSelectionWith: (and senders)

TextEditorCommand
TextEditorCommandHistory

Best,
Marcel
Reply | Threaded
Open this post in threaded view
|

Re: undo question

Denis Kudriashov
Thanks's

2015-11-16 11:01 GMT+01:00 marcel.taeumel <[hidden email]>:
It does not really differ from the old one.

But what Chris so liked?



Reply | Threaded
Open this post in threaded view
|

Re: undo question

marcel.taeumel
The current history is purged "more often" than the old one because the old one was stored in the text morph object and the new one is in the text editor object.

Best,
Marcel