Additional Command 'load'

pathName load inspectResult

Load the text widget with given content inspectResult. The widget will be cleared before the load will be done, this includes all marks, but not the tag definitions. The format of serialContent is described in the inspect subcommand, which produces it. Normally invalid configuaration options will be skipped, except if option -validconfig is specified, in this case an error will be thrown if an invalid option value will be encountered. Normally the latter only may happen if the given content is produced under a different system.

For a complete recovery of the text widget content the following is required:

  • The content contains the complete information (see flag -all of command inspect).
  • All embedded images have to exist.
  • Either the embedded windows have to exist, or the window item contains an executable create option.

The states edit modified, edit altered, and edit irreversible will be resetted to false. Note that this operation cannot be undone.

This provides a way to dump the text format (with command inspect), send the file to anyone, and he will load the content. It's also conceivable that changes to the result of inspect will be done, and then load back with the changes. The first example on page Comparison of Old vs. Revised Implementation is using a data file dumped with command inspect.

Note that the method with inspect/load is significantly faster than loading the result of dump with wish8.6.