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.
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 @@
)
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