• Reference Guide


edit(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.
The data parameter is an l-value referring to a data item that is subject to editing through the window displayed. The data is published to the dispels within the window under the name disp_data. In the functions used within the window, it is not needed to specify explicitly the disp_data identifier, as it is optional. The window edits a local copy of the data. The value of it is stored back to the data item only when the window is closed by the close_window function. If the window is canceled with the Esc key, with the cross button in the right top corner of the window, or with the cancel_window function, the modified data is not stored back to the data item.

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 in the window content definition that call the function close_window. A value is passed to this function as a parameter. Subsequently, this value is returned by the edit function. If the window is closed by the function close_window without a parameter, the edit function returns the value NONE. Another function to close 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