diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 1999-12-23 14:32:06 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 1999-12-23 14:32:06 (GMT) |
commit | a1a0fef2ea9ece5b16f9e6c37800778c64844e69 (patch) | |
tree | 6af31ec1186b5ebe0aed89f5c4159445fff61381 /Mac/Modules/menu/menuedit.py | |
parent | 7b912120caa517ef4fa65eefc26e63f3dea8009a (diff) | |
download | cpython-a1a0fef2ea9ece5b16f9e6c37800778c64844e69.zip cpython-a1a0fef2ea9ece5b16f9e6c37800778c64844e69.tar.gz cpython-a1a0fef2ea9ece5b16f9e6c37800778c64844e69.tar.bz2 |
Unified handle-conversion scheme to
handle = Ctl.as_Resource(ctl)
ctl = Ctl.as_Control(handle)
and similarly for List, Menu, TE. The old handle.as_Control() methods are
still there for backward compatability.
Diffstat (limited to 'Mac/Modules/menu/menuedit.py')
-rw-r--r-- | Mac/Modules/menu/menuedit.py | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/Mac/Modules/menu/menuedit.py b/Mac/Modules/menu/menuedit.py index 8e7d12b..5409663 100644 --- a/Mac/Modules/menu/menuedit.py +++ b/Mac/Modules/menu/menuedit.py @@ -3,17 +3,10 @@ f = Function(void, 'OpenDeskAcc', ) functions.append(f) -f = Function(MenuHandle, 'as_Menu', - (Handle, 'h', InMode)) +f = Function(MenuHandle, 'as_Menu', (Handle, 'h', InMode)) functions.append(f) -as_resource_body = """ -return ResObj_New((Handle)_self->ob_itself); -""" - -f = ManualGenerator("as_Resource", as_resource_body) -f.docstring = lambda : "Return this Menu as a Resource" - +f = Method(Handle, 'as_Resource', (MenuHandle, 'h', InMode)) methods.append(f) # The following have "Mac" prepended to their names in the include file |