diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 2000-09-24 21:56:43 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 2000-09-24 21:56:43 (GMT) |
commit | 486f138224f5d149e2782f71d51c78d9da755b77 (patch) | |
tree | 3edad6bf179110b62ecb26ba038c6b098ce97442 /Mac/Lib/mkcwproject | |
parent | a13a9dcb9c472878db9606ff5c4cc32e74658f84 (diff) | |
download | cpython-486f138224f5d149e2782f71d51c78d9da755b77.zip cpython-486f138224f5d149e2782f71d51c78d9da755b77.tar.gz cpython-486f138224f5d149e2782f71d51c78d9da755b77.tar.bz2 |
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.
Diffstat (limited to 'Mac/Lib/mkcwproject')
-rw-r--r-- | Mac/Lib/mkcwproject/__init__.py | 9 | ||||
-rw-r--r-- | Mac/Lib/mkcwproject/cwtalker.py | 12 |
2 files changed, 16 insertions, 5 deletions
diff --git a/Mac/Lib/mkcwproject/__init__.py b/Mac/Lib/mkcwproject/__init__.py index 8bd3a8d..6551b22 100644 --- a/Mac/Lib/mkcwproject/__init__.py +++ b/Mac/Lib/mkcwproject/__init__.py @@ -40,12 +40,13 @@ def mkproject(outputfile, modulename, settings): # # 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) diff --git a/Mac/Lib/mkcwproject/cwtalker.py b/Mac/Lib/mkcwproject/cwtalker.py index 3b2d3b4..650fd43 100644 --- a/Mac/Lib/mkcwproject/cwtalker.py +++ b/Mac/Lib/mkcwproject/cwtalker.py @@ -1,4 +1,14 @@ 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 @@ -23,4 +33,4 @@ class MyCodeWarrior(CodeWarrior.CodeWarrior): 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) |