]> granicus.if.org Git - python/commitdiff
Added a workaround for shortcomings in the OSA support: there can be class/property...
authorJack Jansen <jack.jansen@cwi.nl>
Sun, 24 Sep 2000 21:56:43 +0000 (21:56 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Sun, 24 Sep 2000 21:56:43 +0000 (21:56 +0000)
Mac/Lib/mkcwproject/__init__.py
Mac/Lib/mkcwproject/cwtalker.py

index 8bd3a8d4a2f9935a26ee7a599ed29d27fa70e284..6551b223f91a02b0b9c0c9eed5b2e0de93cbb80f 100644 (file)
@@ -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)
        
index 3b2d3b42f7bcab0547386bccc1d96bca90d6c28b..650fd43f4b9aed32d4e54309764345849e03f8c4 100644 (file)
@@ -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)