So I assume that there is not way to use the standard undo menu command to a change made by a script in a field, right?The undo command cannot be used to undo actions performed by a script. Only user actions can be undone. For example, if you use a script to change the text in a field, the undo command cannot reverse that change, but if the user edits text, you can use undo to reverse the action.
Implementing Undo for changes to a field made by a script
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Implementing Undo for changes to a field made by a script
The Dictionary reds:
Last edited by Mag on Wed Apr 17, 2013 9:45 am, edited 2 times in total.
-
- VIP Livecode Opensource Backer
- Posts: 9578
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Usinf Undo for changes to a field made by a script
Hi.
This is correct.
The way I would get around it is to set a custom property with the most recent text, perhaps with a "textChanged" message or via a keyDown handler, and if you need to undo, you restore from that. Multiple undo's are possible that way, I suppose, but looks hairy.
Craig Newman
This is correct.
The way I would get around it is to set a custom property with the most recent text, perhaps with a "textChanged" message or via a keyDown handler, and if you need to undo, you restore from that. Multiple undo's are possible that way, I suppose, but looks hairy.
Craig Newman