#
# Generate the project from the xml
#
+ makeproject(dictcopy['mac_projectxmlname'], outputfile)
+
+def makeproject(xmlfile, projectfile):
cw = cwtalker.MyCodeWarrior(start=1)
cw.send_timeout = AppleEvents.kNoTimeOut
-## xmlfss = macfs.FSSpec(dictcopy['mac_projectxmlname'])
-## prjfss = macfs.FSSpec(outputfile)
- xmlfss = dictcopy['mac_projectxmlname']
- prjfss = outputfile
+ xmlfss = macfs.FSSpec(xmlfile)
+ prjfss = macfs.FSSpec(projectfile)
cw.activate()
cw.my_mkproject(prjfss, xmlfss)
import CodeWarrior
+import aetools
+import aetypes
+
+# There is both a class "project document" and a property "project document".
+# We want the class, but the property overrides it.
+#
+##class project_document(aetools.ComponentItem):
+## """project document - a project document """
+## want = 'PRJD'
+project_document=aetypes.Type('PRJD')
class MyCodeWarrior(CodeWarrior.CodeWarrior):
# Bug in the CW OSA dictionary
return _arguments['----']
def my_mkproject(self, prjfile, xmlfile):
- self.make(new=CodeWarrior.project_document(), with_data=xmlfile, as=prjfile)
+ self.make(new=project_document, with_data=xmlfile, as=prjfile)