The TextUndo widget is derived from the Text widget, which simply means that it shares all the capabilities of its ancestor. In object-oriented terminology, we say that TextUndo is a subclass of Text (or, Text is a superclass of TextUndo). You’ll learn more about this subject in Chapter 14.
Of course, we expect TextUndo to do
different from Text, and it does: it has unlimited undos and redos so
that previous editing operations can be rescinded or redone.
Here are the TextUndo methods above and beyond those available for a Text widget:
Displays a messageBox that says “Save edits?”. Returns 0
cancel, 1 if
Displays a messageBox that says “Save edits?.” The widget
is cleared if the reply is
Destroys the widget if you answer
Creates a popup file browser to select a filename.
string from the start of every
Deletes all text and undo/redo information;
Optionally updates the current filename to
pathName. Returns the current filename.
Load, except it does not call
string at the start of every
Loads the contents ...