blob: fbce6205a1115fee675caf301322abd2c0d391fc [file] [log] [blame]
Jack Jansen07642c32000-09-22 23:26:55 +00001import CodeWarrior
2
3class MyCodeWarrior(CodeWarrior.CodeWarrior):
4 # Bug in the CW OSA dictionary
5 def export(self, object, _attributes={}, **_arguments):
6 """export: Export the project file as an XML file
7 Keyword argument _in: the XML file in which to export the project
8 Keyword argument _attributes: AppleEvent attribute dictionary
9 """
10 _code = 'CWIE'
11 _subcode = 'EXPT'
12
13 aetools.keysubst(_arguments, self._argmap_export)
14 _arguments['----'] = _object
15
16
17 _reply, _arguments, _attributes = self.send(_code, _subcode,
18 _arguments, _attributes)
19 if _arguments.has_key('errn'):
20 raise aetools.Error, aetools.decodeerror(_arguments)
21 # XXXX Optionally decode result
22 if _arguments.has_key('----'):
23 return _arguments['----']
24
25 def my_mkproject(self, prjfile, xmlfile):
26 self.make(new=CodeWarrior.project_document, with_data=xmlfile, at=prjfile)