5 # There is both a class "project document" and a property "project document".
6 # We want the class, but the property overrides it.
8 ##class project_document(aetools.ComponentItem):
9 ## """project document - a project document """
11 project_document
=aetypes
.Type('PRJD')
13 class MyCodeWarrior(CodeWarrior
.CodeWarrior
):
14 # Bug in the CW OSA dictionary
15 def export(self
, object, _attributes
={}, **_arguments
):
16 """export: Export the project file as an XML file
17 Keyword argument _in: the XML file in which to export the project
18 Keyword argument _attributes: AppleEvent attribute dictionary
23 aetools
.keysubst(_arguments
, self
._argmap
_export
)
24 _arguments
['----'] = _object
27 _reply
, _arguments
, _attributes
= self
.send(_code
, _subcode
,
28 _arguments
, _attributes
)
29 if _arguments
.has_key('errn'):
30 raise aetools
.Error
, aetools
.decodeerror(_arguments
)
31 # XXXX Optionally decode result
32 if _arguments
.has_key('----'):
33 return _arguments
['----']
35 def my_mkproject(self
, prjfile
, xmlfile
):
36 self
.make(new
=project_document
, with_data
=xmlfile
, as=prjfile
)