Kaydet (Commit) 486f1382 authored tarafından Jack Jansen's avatar Jack Jansen

Added a workaround for shortcomings in the OSA support: there can be…

Added a workaround for shortcomings in the OSA support: there can be class/property conflicts and passing classes as arguments doesn't work. The package now seems to work.
üst a13a9dcb
...@@ -40,12 +40,13 @@ def mkproject(outputfile, modulename, settings): ...@@ -40,12 +40,13 @@ def mkproject(outputfile, modulename, settings):
# #
# Generate the project from the xml # Generate the project from the xml
# #
makeproject(dictcopy['mac_projectxmlname'], outputfile)
def makeproject(xmlfile, projectfile):
cw = cwtalker.MyCodeWarrior(start=1) cw = cwtalker.MyCodeWarrior(start=1)
cw.send_timeout = AppleEvents.kNoTimeOut cw.send_timeout = AppleEvents.kNoTimeOut
## xmlfss = macfs.FSSpec(dictcopy['mac_projectxmlname']) xmlfss = macfs.FSSpec(xmlfile)
## prjfss = macfs.FSSpec(outputfile) prjfss = macfs.FSSpec(projectfile)
xmlfss = dictcopy['mac_projectxmlname']
prjfss = outputfile
cw.activate() cw.activate()
cw.my_mkproject(prjfss, xmlfss) cw.my_mkproject(prjfss, xmlfss)
......
import CodeWarrior 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): class MyCodeWarrior(CodeWarrior.CodeWarrior):
# Bug in the CW OSA dictionary # Bug in the CW OSA dictionary
...@@ -23,4 +33,4 @@ class MyCodeWarrior(CodeWarrior.CodeWarrior): ...@@ -23,4 +33,4 @@ class MyCodeWarrior(CodeWarrior.CodeWarrior):
return _arguments['----'] return _arguments['----']
def my_mkproject(self, prjfile, xmlfile): 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)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment