diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 1995-08-17 14:30:52 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 1995-08-17 14:30:52 (GMT) |
commit | 91a6398b175f8eda53866ccd3dfdcfd2046e8644 (patch) | |
tree | 666fdcf9944769ca3fb377b7f69d60113311a589 /Mac/Modules/dlg/dlgsupport.py | |
parent | 9f37c6d91c1134bd44ee74e2ac77d5e1435f4e71 (diff) | |
download | cpython-91a6398b175f8eda53866ccd3dfdcfd2046e8644.zip cpython-91a6398b175f8eda53866ccd3dfdcfd2046e8644.tar.gz cpython-91a6398b175f8eda53866ccd3dfdcfd2046e8644.tar.bz2 |
Use ResObj_OptNew for GetDialogItem return value: the handle returned
may be NULL (for user items, for instance).
Diffstat (limited to 'Mac/Modules/dlg/dlgsupport.py')
-rw-r--r-- | Mac/Modules/dlg/dlgsupport.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Mac/Modules/dlg/dlgsupport.py b/Mac/Modules/dlg/dlgsupport.py index 8761ea8..0b5f082 100644 --- a/Mac/Modules/dlg/dlgsupport.py +++ b/Mac/Modules/dlg/dlgsupport.py @@ -13,6 +13,12 @@ from macsupport import * DialogPtr = OpaqueByValueType("DialogPtr", "DlgObj") DialogRef = DialogPtr +# XXXX There must be a more elegant way to do this. An OptHandle is +# either a handle or None (in case NULL is passed in). This is needed +# for GetDialogItem(). +OptHandle = OpaqueByValueType("Handle", "ResObj") +OptHandle.new = "ResObj_OptNew" + ModalFilterProcPtr = InputOnlyType("PyObject*", "O") ModalFilterProcPtr.passInput = lambda name: "NewModalFilterProc(Dlg_PassFilterProc(%s))" % name ModalFilterUPP = ModalFilterProcPtr |