2.1 DCOD Calling Structure
Following these two guidelines allows other windows to immediately reflect script changes in the background. If the user later decides to reject the changes (i.e., hits Cancel), the DCOD simply sets the
Modal dialogs should also be made movable (by using window type 5).
Many standard dialogs have modal and non-modal modes. The DCOD caller sets the mode using an "Async" message or attribute. This is useful because the dialog caller can decide which is more important: OK and Cancel buttons, or flexibility.
Generated with CERN WebMaker
2.1.2.1 Modal Dialogs
DCODs that modify the script using a modal dialog should write script changes immediately when the user does anything. Also, the PsyScope utility ECSModalDialog()
should be used instead of the Macintosh Toolbox function ModalDialog()
. returnValue
field of the DCODParams
structure to 0
; the DCOD manager will reverse all of the script changes automatically.ECSModalDialog()
takes care of dragging the window (in System 7.0 and later systems).2.1.2.2 Non-modal dialogs
Non-modal dialogs are generally better for the user than modal dialogs. Unfortunately, this makes the dialog significantly more complex. See "2.2 Asynchronous DCODs".2.1.2.3 Dialog Position
The position of a non-modal or moveable dialog may be saved by using CloseANamedDialog()
instead of DisposeDialog()
. When the dialog is later opened with OpenANamedDialog()
, it will be automatically opened at its previous position. Position information is stored in the preferences file.
PSYX Programmer's Manual - 24 AUG 95
[Next] [Previous] [Up] [Top] [Contents] [Index]