PageRenderTime 12ms CodeModel.GetById 8ms app.highlight 2ms RepoModel.GetById 0ms app.codeStats 0ms

/Lib/plat-mac/lib-scriptpackages/CodeWarrior/Required.py

http://unladen-swallow.googlecode.com/
Python | 62 lines | 33 code | 14 blank | 15 comment | 2 complexity | 1e7969ee8665da4252d560456234759e MD5 | raw file
 1"""Suite Required: Terms that every application should support
 2Level 1, version 1
 3
 4Generated from /Volumes/Sap/Applications (Mac OS 9)/Metrowerks CodeWarrior 7.0/Metrowerks CodeWarrior/CodeWarrior IDE 4.2.5
 5AETE/AEUT resource version 1/0, language 0, script 0
 6"""
 7
 8import aetools
 9import MacOS
10
11_code = 'reqd'
12
13from StdSuites.Required_Suite import *
14class Required_Events(Required_Suite_Events):
15
16    _argmap_open = {
17        'converting' : 'Conv',
18    }
19
20    def open(self, _object, _attributes={}, **_arguments):
21        """open: Open the specified object(s)
22        Required argument: list of objects to open
23        Keyword argument converting: Whether to convert project to latest version (yes/no; default is ask).
24        Keyword argument _attributes: AppleEvent attribute dictionary
25        """
26        _code = 'aevt'
27        _subcode = 'odoc'
28
29        aetools.keysubst(_arguments, self._argmap_open)
30        _arguments['----'] = _object
31
32        aetools.enumsubst(_arguments, 'Conv', _Enum_Conv)
33
34        _reply, _arguments, _attributes = self.send(_code, _subcode,
35                _arguments, _attributes)
36        if _arguments.get('errn', 0):
37            raise aetools.Error, aetools.decodeerror(_arguments)
38        # XXXX Optionally decode result
39        if _arguments.has_key('----'):
40            return _arguments['----']
41
42_Enum_Conv = {
43    'yes' : 'yes ',     # Convert the project if necessary on open
44    'no' : 'no  ',      # Do not convert the project if needed on open
45}
46
47
48#
49# Indices of types declared in this module
50#
51_classdeclarations = {
52}
53
54_propdeclarations = {
55}
56
57_compdeclarations = {
58}
59
60_enumdeclarations = {
61    'Conv' : _Enum_Conv,
62}