script for redo/undo text?

Nicolas Cueto niconiko at gmail.com
Wed Jul 10 22:37:56 EDT 2019


Thank you everyone for the various options/suggestions.

--
N.C.

On Wed, 10 Jul 2019 at 07:24, Mark Wieder via use-livecode <
use-livecode at lists.runrev.com> wrote:

> On 7/8/19 8:05 PM, Nicolas Cueto via use-livecode wrote:
> > Good day eh.
> >
> > To quote a post from "User Experience Stack Exchange
> > <https://ux.stackexchange.com/questions/12629/undo-history-why-limit-it
> >":
> >
> > "<bold> undo/redo is one of the biggest implementation, testing and
> > maintenance headaches </bold>  in any significantly sized application"
> >
> > And yet I ask...
> >
> > Would someone care to volunteer a redo/undo script that works on text in
> a
> > text-field object? ... especially a script that provides (almost) full
> undo
> > history?
>
> The Undo section of my refactor plugin is almost completely
> self-contained, so you should be able to extract those handlers (look
> for the "--> Undo handlers" tag near line 2750) and use them with any
> field. Since they're designed to work with the Script Editor, I think
> the only changes you need to make would be to create your own
> scriptFromEditor() function to grab the field text and your own
> CurrentObject() handler to return the long id of the field.
>
> At any rate, this should get you started. And I'm compressing the text
> before storing it in an array, but as Sean points out, this could get
> out of hand.
>
> <
> https://github.com/mwieder/revRefactor/blob/master/stack_revRefactor_.livecodescript
> >
>
> --
>   Mark Wieder
>   ahsoftware at gmail.com
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the use-livecode mailing list