UI Elements are deleted using the “deleteUI” command or when their parent is deleted. For example, executing the command after running Script 4 above will delete the column layout “TestColumnLayout” and its button children.
deleteUI ExampleWindow4|TestFrameLayout|TestColumnLayout;
To avoid a build up of user created UI elements the default behavior for windows is that they and their contents are deleted when they are closed. Therefore closing a window with the Motif window menu or the “-vis/visible false” flag will delete the window and its contents. A window can be made persistent when it is not visible by using the “-ret/retain” flag on creation.
window w; columnLayout; textField -cc "deleteUI w"; showWindow w;
To avoid the fatal error, use the evalDeferred command. So in the previous example, change the textField command to:
Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License