home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / C / Applications / Python 1.4 / Python 1.4 source / Mac / Lib / toolbox / Metrowerks_Shell_Suite.py < prev    next >
Encoding:
Python Source  |  1996-09-20  |  30.9 KB  |  825 lines  |  [TEXT/Pyth]

  1. """Suite Metrowerks Shell Suite: Events supported by the Metrowerks Project Shell
  2. Level 1, version 1
  3.  
  4. Generated from flap:CW9 Gold:Metrowerks CodeWarrior:CodeWarrior IDE 1.6.3
  5. AETE/AEUT resource version 1/0, language 0, script 0
  6. """
  7.  
  8. import aetools
  9. import MacOS
  10.  
  11. _code = 'MMPR'
  12.  
  13. _Enum_savo = {
  14.     'yes' : 'yes ',    # Save changes
  15.     'no' : 'no  ',    # Do not save changes
  16.     'ask' : 'ask ',    # Ask the user whether to save
  17. }
  18.  
  19. _Enum_ErrT = {
  20.     'information' : 'ErIn',    # 
  21.     'compiler_error' : 'ErCE',    # 
  22.     'compiler_warning' : 'ErCW',    # 
  23.     'definition' : 'ErDf',    # 
  24.     'linker_error' : 'ErLE',    # 
  25.     'linker_warning' : 'ErLW',    # 
  26.     'find_result' : 'ErFn',    # 
  27.     'browser_error' : 'ErBr',    # 
  28. }
  29.  
  30. _Enum_Mode = {
  31.     'ReadWrite' : 'RdWr',    # The file is open with read/write privileges
  32.     'ReadOnly' : 'Read',    # The file is open with read/only privileges
  33.     'CheckedOut_ReadWrite' : 'CkRW',    # The file is checked out with read/write privileges
  34.     'CheckedOut_ReadOnly' : 'CkRO',    # The file is checked out with read/only privileges
  35.     'CheckedOut_ReadModify' : 'CkRM',    # The file is checked out with read/modify privileges
  36.     'Locked' : 'Lock',    # The file is locked on disk
  37.     'None' : 'None',    # The file is new
  38. }
  39.  
  40. _Enum_SrcT = {
  41.     'source' : 'FTxt',    # A source file (.c, .cp, .p, etc).
  42.     'unknown' : 'FUnk',    # An unknown file type.
  43. }
  44.  
  45. _Enum_PPrm = {
  46.     'absolute' : 'Abso',    # An absolute path name, including volume name.
  47.     'project_relative' : 'PRel',    # A path relative to the current project’s folder.
  48.     'shell_relative' : 'SRel',    # A path relative to the CodeWarriorâ„¢ folder.
  49. }
  50.  
  51. _Enum_RefP = {
  52.     'Think_Reference' : 'DanR',    # 
  53.     'QuickView' : 'ALTV',    # 
  54. }
  55.  
  56. class Metrowerks_Shell_Suite:
  57.  
  58.     _argmap_Add_Files = {
  59.         'To_Segment' : 'Segm',
  60.     }
  61.  
  62.     def Add_Files(self, _object, _attributes={}, **_arguments):
  63.         """Add Files: Add the specified file(s) to the current project
  64.         Required argument: List of files to add
  65.         Keyword argument To_Segment: Segment number into which to add the file(s)
  66.         Keyword argument _attributes: AppleEvent attribute dictionary
  67.         Returns: Error code for each file added
  68.         """
  69.         _code = 'MMPR'
  70.         _subcode = 'AddF'
  71.  
  72.         aetools.keysubst(_arguments, self._argmap_Add_Files)
  73.         _arguments['----'] = _object
  74.  
  75.  
  76.         _reply, _arguments, _attributes = self.send(_code, _subcode,
  77.                 _arguments, _attributes)
  78.         if _arguments.has_key('errn'):
  79.             raise aetools.Error, aetools.decodeerror(_arguments)
  80.         # XXXX Optionally decode result
  81.         if _arguments.has_key('----'):
  82.             return _arguments['----']
  83.  
  84.     _argmap_Check_Syntax = {
  85.         'ExternalEditor' : 'Errs',
  86.     }
  87.  
  88.     def Check_Syntax(self, _object, _attributes={}, **_arguments):
  89.         """Check Syntax: Check the syntax of the specified file(s)
  90.         Required argument: List of files to check the syntax of
  91.         Keyword argument ExternalEditor: Should the contents of the message window be returned to the caller?
  92.         Keyword argument _attributes: AppleEvent attribute dictionary
  93.         Returns: Errors for each file whose syntax was checked
  94.         """
  95.         _code = 'MMPR'
  96.         _subcode = 'Chek'
  97.  
  98.         aetools.keysubst(_arguments, self._argmap_Check_Syntax)
  99.         _arguments['----'] = _object
  100.  
  101.  
  102.         _reply, _arguments, _attributes = self.send(_code, _subcode,
  103.                 _arguments, _attributes)
  104.         if _arguments.has_key('errn'):
  105.             raise aetools.Error, aetools.decodeerror(_arguments)
  106.         # XXXX Optionally decode result
  107.         if _arguments.has_key('----'):
  108.             return _arguments['----']
  109.  
  110.     def Close_Project(self, _no_object=None, _attributes={}, **_arguments):
  111.         """Close Project: Close the current project
  112.         Keyword argument _attributes: AppleEvent attribute dictionary
  113.         """
  114.         _code = 'MMPR'
  115.         _subcode = 'ClsP'
  116.  
  117.         if _arguments: raise TypeError, 'No optional args expected'
  118.         if _no_object != None: raise TypeError, 'No direct arg expected'
  119.  
  120.  
  121.         _reply, _arguments, _attributes = self.send(_code, _subcode,
  122.                 _arguments, _attributes)
  123.         if _arguments.has_key('errn'):
  124.             raise aetools.Error, aetools.decodeerror(_arguments)
  125.         # XXXX Optionally decode result
  126.         if _arguments.has_key('----'):
  127.             return _arguments['----']
  128.  
  129.     _argmap_Close_Window = {
  130.         'Saving' : 'savo',
  131.     }
  132.  
  133.     def Close_Window(self, _object, _attributes={}, **_arguments):
  134.         """Close Window: Close the windows showing the specified files
  135.         Required argument: The files to close
  136.         Keyword argument Saving: Whether to save changes to each file before closing its window
  137.         Keyword argument _attributes: AppleEvent attribute dictionary
  138.         """
  139.         _code = 'MMPR'
  140.         _subcode = 'ClsW'
  141.  
  142.         aetools.keysubst(_arguments, self._argmap_Close_Window)
  143.         _arguments['----'] = _object
  144.  
  145.         aetools.enumsubst(_arguments, 'savo', _Enum_savo)
  146.  
  147.         _reply, _arguments, _attributes = self.send(_code, _subcode,
  148.                 _arguments, _attributes)
  149.         if _arguments.has_key('errn'):
  150.             raise aetools.Error, aetools.decodeerror(_arguments)
  151.         # XXXX Optionally decode result
  152.         if _arguments.has_key('----'):
  153.             return _arguments['----']
  154.  
  155.     _argmap_Compile = {
  156.         'ExternalEditor' : 'Errs',
  157.     }
  158.  
  159.     def Compile(self, _object, _attributes={}, **_arguments):
  160.         """Compile: Compile the specified file(s)
  161.         Required argument: List of files to compile
  162.         Keyword argument ExternalEditor: Should the contents of the message window be returned to the caller?
  163.         Keyword argument _attributes: AppleEvent attribute dictionary
  164.         Returns: Errors for each file compiled
  165.         """
  166.         _code = 'MMPR'
  167.         _subcode = 'Comp'
  168.  
  169.         aetools.keysubst(_arguments, self._argmap_Compile)
  170.         _arguments['----'] = _object
  171.  
  172.  
  173.         _reply, _arguments, _attributes = self.send(_code, _subcode,
  174.                 _arguments, _attributes)
  175.         if _arguments.has_key('errn'):
  176.             raise aetools.Error, aetools.decodeerror(_arguments)
  177.         # XXXX Optionally decode result
  178.         if _arguments.has_key('----'):
  179.             return _arguments['----']
  180.  
  181.     _argmap_Create_Project = {
  182.         'from_stationery' : 'Tmpl',
  183.     }
  184.  
  185.     def Create_Project(self, _object, _attributes={}, **_arguments):
  186.         """Create Project: Create a new project file
  187.         Required argument: New project file specifier
  188.         Keyword argument from_stationery: undocumented, typecode 'alis'
  189.         Keyword argument _attributes: AppleEvent attribute dictionary
  190.         """
  191.         _code = 'MMPR'
  192.         _subcode = 'NewP'
  193.  
  194.         aetools.keysubst(_arguments, self._argmap_Create_Project)
  195.         _arguments['----'] = _object
  196.  
  197.  
  198.         _reply, _arguments, _attributes = self.send(_code, _subcode,
  199.                 _arguments, _attributes)
  200.         if _arguments.has_key('errn'):
  201.             raise aetools.Error, aetools.decodeerror(_arguments)
  202.         # XXXX Optionally decode result
  203.         if _arguments.has_key('----'):
  204.             return _arguments['----']
  205.  
  206.     def Get_Definition(self, _object, _attributes={}, **_arguments):
  207.         """Get Definition: Returns the location(s) of a globally scoped function or data object.
  208.         Required argument: undocumented, typecode 'TEXT'
  209.         Keyword argument _attributes: AppleEvent attribute dictionary
  210.         Returns: undocumented, typecode 'FDef'
  211.         """
  212.         _code = 'MMPR'
  213.         _subcode = 'GDef'
  214.  
  215.         if _arguments: raise TypeError, 'No optional args expected'
  216.         _arguments['----'] = _object
  217.  
  218.  
  219.         _reply, _arguments, _attributes = self.send(_code, _subcode,
  220.                 _arguments, _attributes)
  221.         if _arguments.has_key('errn'):
  222.             raise aetools.Error, aetools.decodeerror(_arguments)
  223.         # XXXX Optionally decode result
  224.         if _arguments.has_key('----'):
  225.             return _arguments['----']
  226.  
  227.     def Get_Open_Documents(self, _no_object=None, _attributes={}, **_arguments):
  228.         """Get Open Documents: Returns the list of open documents
  229.         Keyword argument _attributes: AppleEvent attribute dictionary
  230.         Returns: The list of documents
  231.         """
  232.         _code = 'MMPR'
  233.         _subcode = 'GDoc'
  234.  
  235.         if _arguments: raise TypeError, 'No optional args expected'
  236.         if _no_object != None: raise TypeError, 'No direct arg expected'
  237.  
  238.  
  239.         _reply, _arguments, _attributes = self.send(_code, _subcode,
  240.                 _arguments, _attributes)
  241.         if _arguments.has_key('errn'):
  242.             raise aetools.Error, aetools.decodeerror(_arguments)
  243.         # XXXX Optionally decode result
  244.         if _arguments.has_key('----'):
  245.             return _arguments['----']
  246.  
  247.     _argmap_Get_Preferences = {
  248.         'of' : 'PRec',
  249.         'from_panel' : 'PNam',
  250.     }
  251.  
  252.     def Get_Preferences(self, _no_object=None, _attributes={}, **_arguments):
  253.         """Get Preferences: Get the preferences for the current project
  254.         Keyword argument of: Names of requested preferences
  255.         Keyword argument from_panel: Name of the preference panel
  256.         Keyword argument _attributes: AppleEvent attribute dictionary
  257.         Returns: The requested preferences
  258.         """
  259.         _code = 'MMPR'
  260.         _subcode = 'Gref'
  261.  
  262.         aetools.keysubst(_arguments, self._argmap_Get_Preferences)
  263.         if _no_object != None: raise TypeError, 'No direct arg expected'
  264.  
  265.  
  266.         _reply, _arguments, _attributes = self.send(_code, _subcode,
  267.                 _arguments, _attributes)
  268.         if _arguments.has_key('errn'):
  269.             raise aetools.Error, aetools.decodeerror(_arguments)
  270.         # XXXX Optionally decode result
  271.         if _arguments.has_key('----'):
  272.             return _arguments['----']
  273.  
  274.     _argmap_Get_Project_File = {
  275.         'Segment' : 'Segm',
  276.     }
  277.  
  278.     def Get_Project_File(self, _object, _attributes={}, **_arguments):
  279.         """Get Project File: Returns a description of a file in the project window.
  280.         Required argument: The index of the file within its segment.
  281.         Keyword argument Segment: The segment containing the file.
  282.         Keyword argument _attributes: AppleEvent attribute dictionary
  283.         Returns: undocumented, typecode 'SrcF'
  284.         """
  285.         _code = 'MMPR'
  286.         _subcode = 'GFil'
  287.  
  288.         aetools.keysubst(_arguments, self._argmap_Get_Project_File)
  289.         _arguments['----'] = _object
  290.  
  291.  
  292.         _reply, _arguments, _attributes = self.send(_code, _subcode,
  293.                 _arguments, _attributes)
  294.         if _arguments.has_key('errn'):
  295.             raise aetools.Error, aetools.decodeerror(_arguments)
  296.         # XXXX Optionally decode result
  297.         if _arguments.has_key('----'):
  298.             return _arguments['----']
  299.  
  300.     def Get_Project_Specifier(self, _no_object=None, _attributes={}, **_arguments):
  301.         """Get Project Specifier: Return the File Specifier for the current project
  302.         Keyword argument _attributes: AppleEvent attribute dictionary
  303.         Returns: File Specifier for the current project
  304.         """
  305.         _code = 'MMPR'
  306.         _subcode = 'GetP'
  307.  
  308.         if _arguments: raise TypeError, 'No optional args expected'
  309.         if _no_object != None: raise TypeError, 'No direct arg expected'
  310.  
  311.  
  312.         _reply, _arguments, _attributes = self.send(_code, _subcode,
  313.                 _arguments, _attributes)
  314.         if _arguments.has_key('errn'):
  315.             raise aetools.Error, aetools.decodeerror(_arguments)
  316.         # XXXX Optionally decode result
  317.         if _arguments.has_key('----'):
  318.             return _arguments['----']
  319.  
  320.     def Get_Segments(self, _no_object=None, _attributes={}, **_arguments):
  321.         """Get Segments: Returns a description of each segment in the project.
  322.         Keyword argument _attributes: AppleEvent attribute dictionary
  323.         Returns: undocumented, typecode 'Seg '
  324.         """
  325.         _code = 'MMPR'
  326.         _subcode = 'GSeg'
  327.  
  328.         if _arguments: raise TypeError, 'No optional args expected'
  329.         if _no_object != None: raise TypeError, 'No direct arg expected'
  330.  
  331.  
  332.         _reply, _arguments, _attributes = self.send(_code, _subcode,
  333.                 _arguments, _attributes)
  334.         if _arguments.has_key('errn'):
  335.             raise aetools.Error, aetools.decodeerror(_arguments)
  336.         # XXXX Optionally decode result
  337.         if _arguments.has_key('----'):
  338.             return _arguments['----']
  339.  
  340.     def Goto_Function(self, _object, _attributes={}, **_arguments):
  341.         """Goto Function: Goto Specified Function Name
  342.         Required argument: undocumented, typecode 'TEXT'
  343.         Keyword argument _attributes: AppleEvent attribute dictionary
  344.         """
  345.         _code = 'MMPR'
  346.         _subcode = 'GoFn'
  347.  
  348.         if _arguments: raise TypeError, 'No optional args expected'
  349.         _arguments['----'] = _object
  350.  
  351.  
  352.         _reply, _arguments, _attributes = self.send(_code, _subcode,
  353.                 _arguments, _attributes)
  354.         if _arguments.has_key('errn'):
  355.             raise aetools.Error, aetools.decodeerror(_arguments)
  356.         # XXXX Optionally decode result
  357.         if _arguments.has_key('----'):
  358.             return _arguments['----']
  359.  
  360.     def Goto_Line(self, _object, _attributes={}, **_arguments):
  361.         """Goto Line: Goto Specified Line Number
  362.         Required argument: The requested source file line number
  363.         Keyword argument _attributes: AppleEvent attribute dictionary
  364.         """
  365.         _code = 'MMPR'
  366.         _subcode = 'GoLn'
  367.  
  368.         if _arguments: raise TypeError, 'No optional args expected'
  369.         _arguments['----'] = _object
  370.  
  371.  
  372.         _reply, _arguments, _attributes = self.send(_code, _subcode,
  373.                 _arguments, _attributes)
  374.         if _arguments.has_key('errn'):
  375.             raise aetools.Error, aetools.decodeerror(_arguments)
  376.         # XXXX Optionally decode result
  377.         if _arguments.has_key('----'):
  378.             return _arguments['----']
  379.  
  380.     def Is_In_Project(self, _object, _attributes={}, **_arguments):
  381.         """Is In Project: Whether or not the specified file(s) is in the current project
  382.         Required argument: List of files to check for project membership
  383.         Keyword argument _attributes: AppleEvent attribute dictionary
  384.         Returns: Result code for each file
  385.         """
  386.         _code = 'MMPR'
  387.         _subcode = 'FInP'
  388.  
  389.         if _arguments: raise TypeError, 'No optional args expected'
  390.         _arguments['----'] = _object
  391.  
  392.  
  393.         _reply, _arguments, _attributes = self.send(_code, _subcode,
  394.                 _arguments, _attributes)
  395.         if _arguments.has_key('errn'):
  396.             raise aetools.Error, aetools.decodeerror(_arguments)
  397.         # XXXX Optionally decode result
  398.         if _arguments.has_key('----'):
  399.             return _arguments['----']
  400.  
  401.     _argmap_Make_Project = {
  402.         'ExternalEditor' : 'Errs',
  403.     }
  404.  
  405.     def Make_Project(self, _no_object=None, _attributes={}, **_arguments):
  406.         """Make Project: Make the current project
  407.         Keyword argument ExternalEditor: Should the contents of the message window be returned to the caller?
  408.         Keyword argument _attributes: AppleEvent attribute dictionary
  409.         Returns: Errors that occurred while making the project
  410.         """
  411.         _code = 'MMPR'
  412.         _subcode = 'Make'
  413.  
  414.         aetools.keysubst(_arguments, self._argmap_Make_Project)
  415.         if _no_object != None: raise TypeError, 'No direct arg expected'
  416.  
  417.  
  418.         _reply, _arguments, _attributes = self.send(_code, _subcode,
  419.                 _arguments, _attributes)
  420.         if _arguments.has_key('errn'):
  421.             raise aetools.Error, aetools.decodeerror(_arguments)
  422.         # XXXX Optionally decode result
  423.         if _arguments.has_key('----'):
  424.             return _arguments['----']
  425.  
  426.     _argmap_Precompile = {
  427.         'Saving_As' : 'Targ',
  428.         'ExternalEditor' : 'Errs',
  429.     }
  430.  
  431.     def Precompile(self, _object, _attributes={}, **_arguments):
  432.         """Precompile: Precompile the specified file to the specified destination file
  433.         Required argument: File to precompile
  434.         Keyword argument Saving_As: Destination file for precompiled header
  435.         Keyword argument ExternalEditor: Should the contents of the message window be returned to the caller?
  436.         Keyword argument _attributes: AppleEvent attribute dictionary
  437.         Returns: Errors for the precompiled file
  438.         """
  439.         _code = 'MMPR'
  440.         _subcode = 'PreC'
  441.  
  442.         aetools.keysubst(_arguments, self._argmap_Precompile)
  443.         _arguments['----'] = _object
  444.  
  445.  
  446.         _reply, _arguments, _attributes = self.send(_code, _subcode,
  447.                 _arguments, _attributes)
  448.         if _arguments.has_key('errn'):
  449.             raise aetools.Error, aetools.decodeerror(_arguments)
  450.         # XXXX Optionally decode result
  451.         if _arguments.has_key('----'):
  452.             return _arguments['----']
  453.  
  454.     _argmap_Preprocess = {
  455.         'ExternalEditor' : 'Errs',
  456.     }
  457.  
  458.     def Preprocess(self, _object, _attributes={}, **_arguments):
  459.         """Preprocess: Preprocesses the specified file(s)
  460.         Required argument: undocumented, typecode 'alis'
  461.         Keyword argument ExternalEditor: undocumented, typecode 'bool'
  462.         Keyword argument _attributes: AppleEvent attribute dictionary
  463.         Returns: Errors for each preprocessed file
  464.         """
  465.         _code = 'MMPR'
  466.         _subcode = 'PreP'
  467.  
  468.         aetools.keysubst(_arguments, self._argmap_Preprocess)
  469.         _arguments['----'] = _object
  470.  
  471.  
  472.         _reply, _arguments, _attributes = self.send(_code, _subcode,
  473.                 _arguments, _attributes)
  474.         if _arguments.has_key('errn'):
  475.             raise aetools.Error, aetools.decodeerror(_arguments)
  476.         # XXXX Optionally decode result
  477.         if _arguments.has_key('----'):
  478.             return _arguments['----']
  479.  
  480.     def Remove_Binaries(self, _no_object=None, _attributes={}, **_arguments):
  481.         """Remove Binaries: Remove the binary object code from the current project
  482.         Keyword argument _attributes: AppleEvent attribute dictionary
  483.         """
  484.         _code = 'MMPR'
  485.         _subcode = 'RemB'
  486.  
  487.         if _arguments: raise TypeError, 'No optional args expected'
  488.         if _no_object != None: raise TypeError, 'No direct arg expected'
  489.  
  490.  
  491.         _reply, _arguments, _attributes = self.send(_code, _subcode,
  492.                 _arguments, _attributes)
  493.         if _arguments.has_key('errn'):
  494.             raise aetools.Error, aetools.decodeerror(_arguments)
  495.         # XXXX Optionally decode result
  496.         if _arguments.has_key('----'):
  497.             return _arguments['----']
  498.  
  499.     def Remove_Files(self, _object, _attributes={}, **_arguments):
  500.         """Remove Files: Remove the specified file(s) from the current project
  501.         Required argument: List of files to remove
  502.         Keyword argument _attributes: AppleEvent attribute dictionary
  503.         Returns: Error code for each file removed
  504.         """
  505.         _code = 'MMPR'
  506.         _subcode = 'RemF'
  507.  
  508.         if _arguments: raise TypeError, 'No optional args expected'
  509.         _arguments['----'] = _object
  510.  
  511.  
  512.         _reply, _arguments, _attributes = self.send(_code, _subcode,
  513.                 _arguments, _attributes)
  514.         if _arguments.has_key('errn'):
  515.             raise aetools.Error, aetools.decodeerror(_arguments)
  516.         # XXXX Optionally decode result
  517.         if _arguments.has_key('----'):
  518.             return _arguments['----']
  519.  
  520.     def Reset_File_Paths(self, _no_object=None, _attributes={}, **_arguments):
  521.         """Reset File Paths: Resets access paths for all files belonging to open project.
  522.         Keyword argument _attributes: AppleEvent attribute dictionary
  523.         """
  524.         _code = 'MMPR'
  525.         _subcode = 'ReFP'
  526.  
  527.         if _arguments: raise TypeError, 'No optional args expected'
  528.         if _no_object != None: raise TypeError, 'No direct arg expected'
  529.  
  530.  
  531.         _reply, _arguments, _attributes = self.send(_code, _subcode,
  532.                 _arguments, _attributes)
  533.         if _arguments.has_key('errn'):
  534.             raise aetools.Error, aetools.decodeerror(_arguments)
  535.         # XXXX Optionally decode result
  536.         if _arguments.has_key('----'):
  537.             return _arguments['----']
  538.  
  539.     _argmap_Run_Project = {
  540.         'ExternalEditor' : 'Errs',
  541.         'SourceDebugger' : 'DeBg',
  542.     }
  543.  
  544.     def Run_Project(self, _no_object=None, _attributes={}, **_arguments):
  545.         """Run Project: Run the current project
  546.         Keyword argument ExternalEditor: Should the contents of the message window be returned to the caller?
  547.         Keyword argument SourceDebugger: Run the application under the control of the source-level debugger
  548.         Keyword argument _attributes: AppleEvent attribute dictionary
  549.         Returns: Errors that occurred when running the project
  550.         """
  551.         _code = 'MMPR'
  552.         _subcode = 'RunP'
  553.  
  554.         aetools.keysubst(_arguments, self._argmap_Run_Project)
  555.         if _no_object != None: raise TypeError, 'No direct arg expected'
  556.  
  557.  
  558.         _reply, _arguments, _attributes = self.send(_code, _subcode,
  559.                 _arguments, _attributes)
  560.         if _arguments.has_key('errn'):
  561.             raise aetools.Error, aetools.decodeerror(_arguments)
  562.         # XXXX Optionally decode result
  563.         if _arguments.has_key('----'):
  564.             return _arguments['----']
  565.  
  566.     def Save_Message_Window_As(self, _object, _attributes={}, **_arguments):
  567.         """Save Message Window As: Saves the message window as a text file
  568.         Required argument: Destination file for Save Message Window As
  569.         Keyword argument _attributes: AppleEvent attribute dictionary
  570.         """
  571.         _code = 'MMPR'
  572.         _subcode = 'SvMs'
  573.  
  574.         if _arguments: raise TypeError, 'No optional args expected'
  575.         _arguments['----'] = _object
  576.  
  577.  
  578.         _reply, _arguments, _attributes = self.send(_code, _subcode,
  579.                 _arguments, _attributes)
  580.         if _arguments.has_key('errn'):
  581.             raise aetools.Error, aetools.decodeerror(_arguments)
  582.         # XXXX Optionally decode result
  583.         if _arguments.has_key('----'):
  584.             return _arguments['----']
  585.  
  586.     _argmap_Set_Modification_Date = {
  587.         'to' : 'MDat',
  588.     }
  589.  
  590.     def Set_Modification_Date(self, _object, _attributes={}, **_arguments):
  591.         """Set Modification Date: Changes the internal modification date of the specified file(s)
  592.         Required argument: List of files
  593.         Keyword argument to: undocumented, typecode 'ldt '
  594.         Keyword argument _attributes: AppleEvent attribute dictionary
  595.         Returns: Error code for each modified file
  596.         """
  597.         _code = 'MMPR'
  598.         _subcode = 'SMod'
  599.  
  600.         aetools.keysubst(_arguments, self._argmap_Set_Modification_Date)
  601.         _arguments['----'] = _object
  602.  
  603.  
  604.         _reply, _arguments, _attributes = self.send(_code, _subcode,
  605.                 _arguments, _attributes)
  606.         if _arguments.has_key('errn'):
  607.             raise aetools.Error, aetools.decodeerror(_arguments)
  608.         # XXXX Optionally decode result
  609.         if _arguments.has_key('----'):
  610.             return _arguments['----']
  611.  
  612.     _argmap_Set_Preferences = {
  613.         'of_panel' : 'PNam',
  614.         'to' : 'PRec',
  615.     }
  616.  
  617.     def Set_Preferences(self, _no_object=None, _attributes={}, **_arguments):
  618.         """Set Preferences: Set the preferences for the current project
  619.         Keyword argument of_panel: Name of the preference panel
  620.         Keyword argument to: Preferences settings
  621.         Keyword argument _attributes: AppleEvent attribute dictionary
  622.         """
  623.         _code = 'MMPR'
  624.         _subcode = 'Pref'
  625.  
  626.         aetools.keysubst(_arguments, self._argmap_Set_Preferences)
  627.         if _no_object != None: raise TypeError, 'No direct arg expected'
  628.  
  629.  
  630.         _reply, _arguments, _attributes = self.send(_code, _subcode,
  631.                 _arguments, _attributes)
  632.         if _arguments.has_key('errn'):
  633.             raise aetools.Error, aetools.decodeerror(_arguments)
  634.         # XXXX Optionally decode result
  635.         if _arguments.has_key('----'):
  636.             return _arguments['----']
  637.  
  638.     _argmap_Set_Project_File = {
  639.         'to' : 'SrcS',
  640.     }
  641.  
  642.     def Set_Project_File(self, _object, _attributes={}, **_arguments):
  643.         """Set Project File: Changes the settings for a given file in the project.
  644.         Required argument: The name of the file
  645.         Keyword argument to: The new settings for the file
  646.         Keyword argument _attributes: AppleEvent attribute dictionary
  647.         """
  648.         _code = 'MMPR'
  649.         _subcode = 'SFil'
  650.  
  651.         aetools.keysubst(_arguments, self._argmap_Set_Project_File)
  652.         _arguments['----'] = _object
  653.  
  654.  
  655.         _reply, _arguments, _attributes = self.send(_code, _subcode,
  656.                 _arguments, _attributes)
  657.         if _arguments.has_key('errn'):
  658.             raise aetools.Error, aetools.decodeerror(_arguments)
  659.         # XXXX Optionally decode result
  660.         if _arguments.has_key('----'):
  661.             return _arguments['----']
  662.  
  663.     _argmap_Set_Segment = {
  664.         'to' : 'Segm',
  665.     }
  666.  
  667.     def Set_Segment(self, _object, _attributes={}, **_arguments):
  668.         """Set Segment: Changes the name and attributes of a segment.
  669.         Required argument: The segment to change
  670.         Keyword argument to: The new name and attributes for the segment.
  671.         Keyword argument _attributes: AppleEvent attribute dictionary
  672.         """
  673.         _code = 'MMPR'
  674.         _subcode = 'SSeg'
  675.  
  676.         aetools.keysubst(_arguments, self._argmap_Set_Segment)
  677.         _arguments['----'] = _object
  678.  
  679.  
  680.         _reply, _arguments, _attributes = self.send(_code, _subcode,
  681.                 _arguments, _attributes)
  682.         if _arguments.has_key('errn'):
  683.             raise aetools.Error, aetools.decodeerror(_arguments)
  684.         # XXXX Optionally decode result
  685.         if _arguments.has_key('----'):
  686.             return _arguments['----']
  687.  
  688.     def Touch(self, _object, _attributes={}, **_arguments):
  689.         """Touch: Force recompilation of the specified file(s)
  690.         Required argument: List of files to compile
  691.         Keyword argument _attributes: AppleEvent attribute dictionary
  692.         Returns: Error code for each file touched
  693.         """
  694.         _code = 'MMPR'
  695.         _subcode = 'Toch'
  696.  
  697.         if _arguments: raise TypeError, 'No optional args expected'
  698.         _arguments['----'] = _object
  699.  
  700.  
  701.         _reply, _arguments, _attributes = self.send(_code, _subcode,
  702.                 _arguments, _attributes)
  703.         if _arguments.has_key('errn'):
  704.             raise aetools.Error, aetools.decodeerror(_arguments)
  705.         # XXXX Optionally decode result
  706.         if _arguments.has_key('----'):
  707.             return _arguments['----']
  708.  
  709.     _argmap_Update_Project = {
  710.         'ExternalEditor' : 'Errs',
  711.     }
  712.  
  713.     def Update_Project(self, _no_object=None, _attributes={}, **_arguments):
  714.         """Update Project: Update the current project
  715.         Keyword argument ExternalEditor: Should the contents of the message window be returned to the caller?
  716.         Keyword argument _attributes: AppleEvent attribute dictionary
  717.         Returns: Errors that occurred while updating the project
  718.         """
  719.         _code = 'MMPR'
  720.         _subcode = 'UpdP'
  721.  
  722.         aetools.keysubst(_arguments, self._argmap_Update_Project)
  723.         if _no_object != None: raise TypeError, 'No direct arg expected'
  724.  
  725.  
  726.         _reply, _arguments, _attributes = self.send(_code, _subcode,
  727.                 _arguments, _attributes)
  728.         if _arguments.has_key('errn'):
  729.             raise aetools.Error, aetools.decodeerror(_arguments)
  730.         # XXXX Optionally decode result
  731.         if _arguments.has_key('----'):
  732.             return _arguments['----']
  733.  
  734.  
  735. #    Class 'Access Paths' ('PATH') -- 'Contains the definitions of a project\325s access (search) paths.'
  736. #        property 'User Paths' ('PA01') 'PInf' -- 'To add an access path for the source files.' [mutable list]
  737. #        property 'System Paths' ('PA03') 'PInf' -- 'To add an access path for the include files. (Not supported in Pascal)' [mutable list]
  738. #        property 'Always Full Search' ('PA02') 'bool' -- 'To force the compiler to search for system includes like it searches for user includes.' [mutable]
  739.  
  740. #    Class 'Document' ('docu') -- 'An open text file'
  741. #        property 'name' ('pnam') 'TEXT' -- 'The document\325s name' []
  742. #        property 'mode' ('Mode') 'Mode' -- 'The document\325s open mode' [enum]
  743. #        property 'disk file' ('file') 'fss ' -- 'The document\325s location on disk' []
  744.  
  745. #    Class 'Editor' ('EDTR') -- ''
  746. #        property 'Syntax coloring' ('ED01') 'bool' -- 'Mark keywords and comments with color.' [mutable]
  747. #        property 'Text color' ('ED02') 'cRGB' -- 'The color for ordinary text.' [mutable]
  748. #        property 'Comment color' ('ED03') 'cRGB' -- 'The color for comments.' [mutable]
  749. #        property 'Keyword color' ('ED04') 'cRGB' -- 'The color for language keywords.' [mutable]
  750. #        property 'String color' ('ED05') 'cRGB' -- 'The color for strings.' [mutable]
  751. #        property 'Custom color' ('ED06') 'cRGB' -- 'The color for custom keywords.' [mutable]
  752. #        property 'Flash delay' ('ED07') 'long' -- 'The amount of time, in sixtieths of a second, the editor highlights a matching bracket.' [mutable]
  753. #        property 'Dynamic scroll' ('ED08') 'bool' -- 'Display a window\325s contents as you move the scroll box.' [mutable]
  754. #        property 'Balance' ('ED09') 'bool' -- 'Flash the matching opening bracket when you type a closing bracket.' [mutable]
  755. #        property 'Remember font' ('ED10') 'bool' -- 'Display a source file with its own font settings.' [mutable]
  756. #        property 'Remember window' ('ED11') 'bool' -- 'Restore the last size and position for a source file window when you open it.' [mutable]
  757. #        property 'Remember selection' ('ED12') 'bool' -- 'Restore the previous selection in a file when you open it.' [mutable]
  758. #        property 'Save on update' ('ED13') 'bool' -- 'Save all editor windows automatically when you choose the Update command.' [mutable]
  759. #        property 'Projector aware' ('ED14') 'bool' -- "Honor MPW Projector\325s 'CKID' resources in text files." [mutable]
  760.  
  761. #    Class 'Error Information' ('ErrM') -- 'Describes a single error or warning from the compiler or the linker.'
  762. #        property 'kind' ('ErrT') 'ErrT' -- 'The type of error or warning.' [enum]
  763. #        property 'message' ('ErrS') 'TEXT' -- 'The error or warning message.' []
  764. #        property 'disk file' ('file') 'fss ' -- 'The file where the error occurred.  May not be returned for certain kinds of errors (eg, link errors).' []
  765. #        property 'line' ('ErrL') 'long' -- 'The line in the file where the error occurred.  May not be returned for certain kinds of errors (eg, link errors).' []
  766.  
  767. #    Class 'Extras' ('EXTR') -- ''
  768. #        property 'Completion sound' ('EX01') 'bool' -- 'Play a sound when finished a Bring Up To Date or Make command.' [mutable]
  769. #        property 'Success sound' ('EX02') 'TEXT' -- 'The sound CodeWarrior plays when it successfully finishes a Bring Up To Date or Make command.' [mutable]
  770. #        property 'Failure sound' ('EX03') 'TEXT' -- 'The sound CodeWarrior plays when it cannot finish a Bring Up To Date or Make command.' [mutable]
  771. #        property 'Modification date caching' ('EX04') 'bool' -- '' [mutable]
  772. #        property 'Generate Map' ('EX05') 'bool' -- 'Generate a Pascal Make map file.' [mutable]
  773. #        property 'Store analysis results' ('EX06') 'bool' -- '' [mutable]
  774. #        property 'Full screen zoom' ('EX07') 'bool' -- 'Zoom windows to the full screen width.' [mutable]
  775. #        property 'External reference' ('EX08') 'RefP' -- 'Which on-line function reference to use.' [mutable enum]
  776. #        property 'Browser active' ('EX09') 'bool' -- 'Allow the collection of browser information.' [mutable]
  777.  
  778. #    Class 'Font' ('mFNT') -- ''
  779. #        property 'Auto indent' ('FN01') 'bool' -- 'Indent new lines automatically.' [mutable]
  780. #        property 'Tab size' ('FN02') 'shor' -- '' []
  781. #        property 'Text font' ('ptxf') 'TEXT' -- 'The font used in editing windows.' [mutable]
  782. #        property 'Text size' ('ptps') 'shor' -- 'The size of the text in an editing window.' [mutable]
  783.  
  784. #    Class 'Function Information' ('FDef') -- 'Describes the location of any function or global data definition within the current project.'
  785. #        property 'disk file' ('file') 'fss ' -- 'The location on disk of the file containing the definition.' []
  786. #        property 'line' ('ErrL') 'long' -- 'The line number where the definition begins.' []
  787.  
  788. #    Class 'Path Information' ('PInf') -- 'Contains all of the parameters that describe an access path.'
  789. #        property 'name' ('pnam') 'TEXT' -- 'The actual path name.' [mutable]
  790. #        property 'recursive' ('Recu') 'bool' -- 'Will the path be searched recursively?  (Default is true)' [mutable]
  791. #        property 'origin' ('Orig') 'PPrm' -- '' [mutable enum]
  792.  
  793. #    Class 'ProjectFile' ('SrcF') -- 'A file contained in a project'
  794. #        property 'filetype' ('SrcT') 'SrcT' -- 'What kind of file is this ?' [enum]
  795. #        property 'name' ('pnam') 'TEXT' -- 'The file\325s name' []
  796. #        property 'disk file' ('file') 'fss ' -- 'The file\325s location on disk' []
  797. #        property 'codesize' ('CSiz') 'long' -- 'The size of this file\325s code.' []
  798. #        property 'datasize' ('DSiz') 'long' -- 'The size of this file\325s data.' []
  799. #        property 'up to date' ('UpTD') 'bool' -- 'Has the file been compiled since its last modification ?' []
  800. #        property 'symbols' ('SymG') 'bool' -- 'Are debugging symbols generated for this file ?' [mutable]
  801. #        property 'weak link' ('Weak') 'bool' -- 'Is this file imported weakly into the project ? [PowerPC only]' [mutable]
  802. #        property 'initialize before' ('Bfor') 'bool' -- 'Intiailize the shared library before the main application.' [mutable]
  803.  
  804. #    Class 'Segment' ('Seg ') -- 'A segment or group in the project'
  805. #        property 'name' ('pnam') 'TEXT' -- '' [mutable]
  806. #        property 'filecount' ('NumF') 'shor' -- '' []
  807. #        property 'preloaded' ('Prel') 'bool' -- 'Is the segment preloaded ? [68K only]' [mutable]
  808. #        property 'protected' ('Prot') 'bool' -- 'Is the segment protected ? [68K only]' [mutable]
  809. #        property 'locked' ('PLck') 'bool' -- 'Is the segment locked ? [68K only]' [mutable]
  810. #        property 'purgeable' ('Purg') 'bool' -- 'Is the segment purgeable ? [68K only]' [mutable]
  811. #        property 'system heap' ('SysH') 'bool' -- 'Is the segment loaded into the system heap ? [68K only]' [mutable]
  812.  
  813. #    Class 'Target' ('TARG') -- 'Contains the definitions of a project\325s target.'
  814. #        property 'Current Target' ('TA01') 'TEXT' -- 'The name of the current target.' [mutable]
  815. #        property 'Mappings' ('TA08') 'TInf' -- '' [mutable list]
  816.  
  817. #    Class 'Target Information' ('TInf') -- ''
  818. #        property 'File Type' ('PR04') 'TEXT' -- '' [mutable]
  819. #        property 'Extension' ('TA02') 'TEXT' -- '' [mutable]
  820. #        property 'Precompiled' ('TA03') 'bool' -- '' [mutable]
  821. #        property 'Resource File' ('TA04') 'bool' -- '' [mutable]
  822. #        property 'Launchable' ('TA05') 'bool' -- '' [mutable]
  823. #        property 'Ignored by Make' ('TA06') 'bool' -- '' [mutable]
  824. #        property 'Compiler' ('TA07') 'TEXT' -- '' [mutable]
  825.