• Reference Guide


ask(title, disp_def)
ask(data, title, disp_def)
The function creates a window with the specified title (the type String). The content of the window is specified by a dispel definition object passed as the disp_def parameter of the type Dispel_def.
If the data parameter (of an arbitrary type) is specified, the data will be published to the dispels displayed in the window. The data will be published under the name disp_data. In the functions used in the window, it is not needed to specify explicitly the disp_data identifier, as it is optional. On contrary to the function edit, the changes made to the data during the window is open are discarded before the window is closed and the ask function returns.

Return Value

If the window is canceled with the cross button in the right top window corner or with the Esc key, an error is returned. To enable regular closing the window, it is necessary to create one or more buttons within the window content definition that call the function close_window. A value is passed to this function as its parameter. Subsequently, this value is returned by the ask function. If the window is closed by the function close_window without a parameter, the ask function returns the value NONE. Another function that closes the window is the cancel_window function. When the window is closed with this function, an error is returned.
If an error occurs, an Error value is returned.


The dispel definition can be specified as a constant or by a reference to a presentation definition in the document section Presentation – for instance: document.presentation.presentation_name.child.
If it is just required to display an existing presentation defined in the document section Presentation, it suffices to use the following statement:
document.presentation.presentation_name.open_in_window = TRUE;

See Also