Added methods as_Menu and as_Control to convert a resource
to those object types

You can now set the data attribute of a resource with the expected
semantics (but you have to call ChangedResource yourself)
diff --git a/Mac/Modules/res/resedit.py b/Mac/Modules/res/resedit.py
index 5e54ef2..bffec5f 100644
--- a/Mac/Modules/res/resedit.py
+++ b/Mac/Modules/res/resedit.py
@@ -23,3 +23,19 @@
 Apply AddResource() to write it to a resource file.
 """
 functions.append(f)
+
+# Convert resources to other things.
+
+as_xxx_body = """
+return %sObj_New((%sHandle)_self->ob_itself);
+"""
+
+def genresconverter(longname, shortname):
+
+	f = ManualGenerator("as_%s"%longname, as_xxx_body%(shortname, longname))
+	docstring =  "Return this resource/handle as a %s"%longname
+	f.docstring = lambda docstring=docstring: docstring
+	return f
+
+resmethods.append(genresconverter("Control", "Ctl"))
+resmethods.append(genresconverter("Menu", "Menu"))