/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
  2. Level 1, version 1
  3. Generated from /Volumes/Sap/Applications (Mac OS 9)/Metrowerks CodeWarrior 7.0/Metrowerks CodeWarrior/CodeWarrior IDE 4.2.5
  4. AETE/AEUT resource version 1/0, language 0, script 0
  5. """
  6. import aetools
  7. import MacOS
  8. _code = 'reqd'
  9. from StdSuites.Required_Suite import *
  10. class Required_Events(Required_Suite_Events):
  11. _argmap_open = {
  12. 'converting' : 'Conv',
  13. }
  14. def open(self, _object, _attributes={}, **_arguments):
  15. """open: Open the specified object(s)
  16. Required argument: list of objects to open
  17. Keyword argument converting: Whether to convert project to latest version (yes/no; default is ask).
  18. Keyword argument _attributes: AppleEvent attribute dictionary
  19. """
  20. _code = 'aevt'
  21. _subcode = 'odoc'
  22. aetools.keysubst(_arguments, self._argmap_open)
  23. _arguments['----'] = _object
  24. aetools.enumsubst(_arguments, 'Conv', _Enum_Conv)
  25. _reply, _arguments, _attributes = self.send(_code, _subcode,
  26. _arguments, _attributes)
  27. if _arguments.get('errn', 0):
  28. raise aetools.Error, aetools.decodeerror(_arguments)
  29. # XXXX Optionally decode result
  30. if _arguments.has_key('----'):
  31. return _arguments['----']
  32. _Enum_Conv = {
  33. 'yes' : 'yes ', # Convert the project if necessary on open
  34. 'no' : 'no ', # Do not convert the project if needed on open
  35. }
  36. #
  37. # Indices of types declared in this module
  38. #
  39. _classdeclarations = {
  40. }
  41. _propdeclarations = {
  42. }
  43. _compdeclarations = {
  44. }
  45. _enumdeclarations = {
  46. 'Conv' : _Enum_Conv,
  47. }