Chapter 2. DCODs
-1as the result in the
returnValuefield of the
The DCOD manager assumes that asynchronous dialogs are controlling non-modal dialogs. For this reason, an asynchronous DCOD must have a dialog that is the frontmost window when it returns from handling the dialog message. The DCOD lets the DCOD manager know when it is done by calling
RemoveWindowFromAsyncList(), passing in its window.
If you want to write an asynchronous dialog that does not control a non-modal dialog, you can hack it together this way: create a dummy window off-screen (but still as the frontmost window), and pass back
-2 instead of
returnValue. The DCOD manager will hide the window so that it doesn't get in the user's way, but you still use this window for
A DCOD implementing a non-modal dialog is responsible for interfacing with PsyScope's non-modal dialog architecture. This system involves registering the window with a table of callback functions. The functions are called to the let the DCOD handle user events, background tasks, etc. See "Chapter 12. Windows in PsyScope" for more information.
If some menu item has opened an asynchronous dialog item, reselecting the item should open the same dialog. The DCOD manager makes no attempt to handle this problem, so the DCOD is responsible for noticing when it is asked to do something that it is already doing. Utilities have been provided to help solve this problem:
RefWindowClosed(). See "Chapter 12. Windows in PsyScope".
Generated with CERN WebMaker