CloseWindow
new in Analytica 4.7
CloseWindow( obj, windowType )
Closes a window in the Analytica user interface.
- «obj» is an identifier.
- «windowType» is one of the following:
"Diagram"
: Closes the Diagram window for Module «obj»."Object"
: Closes the Object window for «obj»."Result"
: Closes the Result window for «obj». «Obj» should be a variable."EditTable"
: Closes the edit table window for «obj»."Outline"
: Closes (hides) the Outline window. The «obj» parameter is ignored."Typescript"
: Closes the Typescript Window. The «obj» parameter is ignored.
There is no meaningful return value.
Notes
If you use this to close the last open window, not counting the typescript window, it will close the model. The user will be asked whether he wishes to save any changes if any changes have occurred.
The function fails quietly, meaning that it does not issue an error if the requested window is not open, or if you tell it to close a diagram for a non-module, a result for a non-variable, etc. Error messages are issued when the «obj» parameter does not identify an existing object or «windowType» is not a recognized value.
The function is usually used in a button's OnClick event expression.
Examples
Close the diagram for Module Mo2
CloseWindow(Mo2,"Diagram")
Close the Object window for Va1
CloseWindow(Va1, "Object")
Close the Outline window (note: «obj» ignored, so can be anything)
CloseWindow(Null,"Outline")
Enable comment auto-refresher