diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 1995-06-18 20:17:27 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 1995-06-18 20:17:27 (GMT) |
commit | a177228ff8596f2457c8f527ec919c7c6f7c60fc (patch) | |
tree | 607e0aabc33b6c55da47798f21e9623eb8cc1404 /Mac/Modules/menu/menuedit.py | |
parent | 5d56f4b4034476ae65412277175aa5254eb741cb (diff) | |
download | cpython-a177228ff8596f2457c8f527ec919c7c6f7c60fc.zip cpython-a177228ff8596f2457c8f527ec919c7c6f7c60fc.tar.gz cpython-a177228ff8596f2457c8f527ec919c7c6f7c60fc.tar.bz2 |
Added as_Resource() method to convert menu object to res object
Diffstat (limited to 'Mac/Modules/menu/menuedit.py')
-rw-r--r-- | Mac/Modules/menu/menuedit.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Mac/Modules/menu/menuedit.py b/Mac/Modules/menu/menuedit.py index e50dadd..7d53cd5 100644 --- a/Mac/Modules/menu/menuedit.py +++ b/Mac/Modules/menu/menuedit.py @@ -2,3 +2,12 @@ f = Function(void, 'OpenDeskAcc', (Str255, 'name', 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" + +methods.append(f) |