home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-08-26 | 2.0 KB | 63 lines | [TEXT/TCEd] |
- #
- # NextMPWError
- #
- # Last Modified: Tuesday, July 23, 1991 at 11:46 PM
- #
- # Reads the MPW Worksheet file to find and process each error in the last
- # compile. Repeatedly running the macro will open and select each error.
- # YOU MUST SAVE THE WORKSHEET FILE BEFORE YOU RUN THIS MACRO IF YOU WANT
- # TO PICK UP THE LATEST COMPILATION ERRORS. Also, make sure the current
- # directory (the Open window directory) is set to the directory that
- # the MPW Shell is reporting errors from.
- #
- # Steps:
- # 1) Add the line:
- # ':Macros:NextMPWError'
- # to the Preditor.startup file (or your own startup file)
- # OR execute the macro by typing:
- # "NextMPWError()" <cr>
- # 2) Compile you program with MPW - let it spit out some error messages
- # 3) SAVE the Worksheet file
- # 4) Run or switch to Preditor
- # 5) Execute the macro "Next MPW Error" from the Macro menu (or use the
- # key assignment - the default is command-option-M).
- # 6) Preditor will open the Worksheet file, locate the first error
- # message, open the file and scroll to the correct line #
- # 7) Repeatedly run "Next MPW Error" error to "goto" the next error
- # 8) CLOSE the Worksheet before recompiling - and re-running the macro
- #
- # This script works only with MPW 3.X and if you are using the MPW build
- # scripts that produce a unique message, shown below. You can replace this
- # unique message with something else if you are compiling in another fashion.
- #
- # © Copyright Evatac Software 1988-1991
- # All rights reserved
- #
-
- AddMenu "Next MPW Error" 46 10 # Assign to option-shift-M
-
- uniqueString = "----- Build of"
- mpwPath = "MPW:Worksheet"
-
- continuing = 0
-
- For (name, ~Windows)
- If (name == "Worksheet")
- continuing = 1
- break
- End
- End
-
- If (continuing == 0)
- Open(mpwPath, "r")
- Hide("", "Worksheet") # We don't need to see the worksheet
- Select(∞, "Worksheet")
- Search("b", uniqueString, NULL, "Worksheet")
- End
-
- Search("cp", "^[ \\t]*File ", NULL, "Worksheet")
- Select(«0:[»1]≤1, "Worksheet")
- ShowLine("Worksheet")
-
- EndMenu
-