Generic Function | Package: cg | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 9.0 Unrevised from 8.2 to 9.0. 8.2 version

## flag-modal-completion

Arguments: window &optional value

Tells the system that the user has completed interaction with a modal dialog, and so the dialog should go away and the call to pop-up-modal-dialog that invoked the modal dialog should now return. A call to flag-modal-completion is not a non-local exit like a throw; it merely sets a flag that is noticed asynchronously after the event-handling code that calls flag-modal-completion has exited.

flag-modal-completion is called internally if the on-change event handler function for a control returns a true second value, or if the default on-change event handler function is used with a `default-button` or `cancel-button`. An application can also call flag-modal-completion explicitly to end interaction with a modal dialog. For example, the on-double-click event handler function for an item-list control could call flag-modal-completion with the value of the item-list to be returned from the call to pop-up-modal-dialog.

window is the modal dialog. If window is not presently being invoked modally with pop-up-modal-dialog (see is-modal), then flag-modal-completion simply does nothing.

value is an arbitrary value that will be returned from pop-up-modal-dialog.

A multiprocessing note: flag-modal-completion will work only if it is called in the same process that called pop-up-modal-dialog, because each process maintains its own independent stack of currently-invoked modal dialogs. If called in a different process, it will do nothing. If you are attempting to programmatically exit a modal dialog from a different process, this probably indicates that the dialog should not be modal at all. A modal dialog is intended to be exited only by a user interactively manipulating its widgets (where the on-change or other event handler of one of the widgets could call flag-modal-completion).

Copyright (c) 1998-2019, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 8.2 page.
Created 2012.5.30.

|  | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 9.0 Unrevised from 8.2 to 9.0. 8.2 version