home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Utilities / Programming / MT2ToolKit 1.0b1 / Read.Me! < prev    next >
Encoding:
Text File  |  1995-10-14  |  9.8 KB  |  253 lines  |  [TEXT/MPS ]

  1. --------------------------------------------------
  2. MT2ToolKit, version 1.0b1
  3. (C) Copyright by Michael Trofimov, 10/6/95.
  4. --------------------------------------------------
  5.  
  6. MT2ToolKit version 1.0b1 is tool kit for MPW Pascal programmers. It makes easier
  7. a variety of permanent programming jobs and so, it's  capable to save your time
  8. and efforts, and, perhaps, to preserve against some simple, but wide-distributed
  9. bugs.
  10.  
  11. This version of the kit supports checking up and marking Pascal sources,
  12. additional opportunities for navigation within the source, and even 
  13. automatical-writing a program from scratch!
  14.  
  15. NOTE: This is beta-version! (Some restrictions had been fixed already.) But in
  16. the near future, updated version will be ready. Be sure to connect with the
  17. author directly via network: 
  18.  
  19. mtrofimov@glas.apc.org
  20.  
  21. to get the next version as soon as possible. The next version will be extended
  22. by new tools and scripts (see 'Other MT2 software' file). To do this work
  23. faster and better, author needs your comments!
  24.  
  25. This version of MT2ToolKit was implemented and tested 
  26. under MPW Shell 3.3.1, © Apple Computer, Inc.
  27.  
  28.  
  29. MT2ToolKit version 1.0b1 contains :
  30.  
  31. Read.Me!                # this file
  32. 'About MT2ToolKit'      # picture, which shows how to find MT2ToolKit items
  33.                         # in menus of MPW shell
  34. 'Other MT2 software'    # other software by this author
  35. NewItems.Help            # help file
  36. UserStartup•MT2ToolKit     # MPW startup file
  37. CheckPasSyntax            # script to check Pascal syntax in active/target window
  38. Gener                    # script to generate pattern for an array initialization
  39. MarkSour2                # script to mark procedure/function names in active/target window
  40. PascalMenu                # script to add Pascal menu
  41. PasteData                # script to replace {%%} markers with values from data file 
  42. Signature                # script to type user's copyright string
  43. :Trivial:                # folder, there are Trivial tool and its patterns, 
  44.                         # to generate Pascal source from resource description file;
  45.                         # also there is Example folder
  46.  
  47. Usage is very simple : you need not remember names of new commands -- some of
  48. them will be added to MPW menu during MPW Shell start up, the others you can add
  49. (and remove) by selecting of the menu items. (See picture in 'About MT2ToolKit'
  50. file).Also, Trivial and Gener have resources to support Commando dialog. To get
  51. info about each command, you will find new items in Help menu. 
  52.  
  53. Also, short descriptions and a few examples are followed here.
  54.  
  55. • Pascal menu 
  56. • Delete the menu
  57.  
  58. Use this items to add (remove) Pascal menu. (Note: the Pascal menu help item
  59. will be added (removed) synchronously. See 'About MT2ToolKit' picture, as well.)
  60. Be sure to modify UserStartup•MT2ToolKit, if you want that the Pascal menu would
  61. be added any time MPW Shell is running, but if your Mac has small screen and
  62. sometime you need to add another menus to MPW menu bar, Pascal menu deletion
  63. may be necessary.
  64.  
  65. • Rotate Windows
  66.  
  67. implements RotateWindows MPW command in menu.
  68.  
  69. • Signature 
  70.  
  71. Select this item in Edit menu to insert copyright string to current position of 
  72. a text. For example:
  73.  
  74. (C) Copyright by Michael Trofimov, 10/6/95. 
  75.  
  76. (See UserStartup•MT2ToolKit file to set your name for generation of this string).
  77.  
  78. • Check syntax
  79.  
  80. Select this menu item when you want to check up syntax of your program in
  81. current window. Errors report will be directed to MPW Worksheet window, the
  82. first line of the report will be selected, no object code will be generated. In
  83. the case, when  no error has been found, an alert box with corresponded message
  84. opens.
  85.  
  86. • Match delimiters
  87.  
  88. This item makes more handle MPW MatchIt command. Select first bracket in your
  89. source (for example, BEGIN key word) and select this item -- the matched END
  90. will be found (selected).
  91.  
  92. • Mark source
  93.  
  94. makes more handle MPW marking (Mark, Unmark, Browse). To mark new program or
  95. remark modified program, which was marked before, select this item when the
  96. program is in active window.
  97.  
  98. • Add %%-marker
  99.  
  100. inserts special characters marker (%%-marker):
  101.  
  102. {%%}
  103.  
  104. to selected position in the source text. You can use these markers to mark any
  105. places in the program. The NextMarker and PredMarker commands will find next and
  106. pred. %%-markers respectively. These markers also may be generated by Gener and
  107. Trivial commands. 
  108.  
  109. NOTE: the comment:
  110.  
  111. {%%any comment}
  112.  
  113. also has %%-marker, for example, NextMarker (PredMarker) selects it entirely,
  114. i.e. from "{"-bracket to "}"-bracket. It allows you to make marked comments,
  115. which easily may be found, modified and deleted. The feature is very useful for
  116. program development to maintain temporary comments.
  117.  
  118. • Generate array 
  119. • Paste data
  120.  
  121. The "Generate array" menu command generates pattern for array initialization. 
  122. For example, a command
  123.  
  124.              gener theArray 1 2 3 4
  125.  
  126. generates  a text:
  127.  
  128.             theArray [1,3] := {%%};  theArray [1,4] := {%%};  
  129.             theArray [2,3] := {%%};  theArray [2,4] := {%%}; 
  130.             
  131. And a command :
  132.  
  133.              gener myArray -1 2
  134.  
  135. generates  a text:
  136.  
  137.             myArray [-1] := {%%};  
  138.             myArray [0] := {%%};  
  139.             myArray [1] := {%%};  
  140.             myArray [2] := {%%}; 
  141.             
  142. After that, you will need replacing %%-markers with necessary values. To do it via
  143. keyboard-input you can use NextMarker and PredMarker commands. But if you have
  144. text file where necessary values were already written, you can use "Paste data"
  145. menu command.
  146.  
  147.  • Trivial 
  148.  
  149.  generates Pascal source from resource description file.
  150.  For example, see Example folder in Trivial folder :
  151.  
  152. -- First of all we created test.rsrc file by ResEdit.
  153. -- After it we decompiled it via DeRez into test.r resources description file.
  154. -- And then we input test.r into Trivial, its output was test.p file.
  155.  
  156. You can see the produced files test.p, test.Dict and test in 'test ƒ' folder.
  157.  
  158. To remake these files by yourself:
  159.  
  160. 1) Set the default directory to "Example:"
  161. 2) To make test.p, select the following line and press Enter.
  162.         Trivial test.r > test.p
  163.  
  164. 3) To build test, select the following line and press Enter.
  165.          BuildProgram test  ∑∑ "{Worksheet}"
  166.  
  167. NOTE: To quit from test you should press Option-Command-Esc keys to force quit
  168. or you may add a few lines of Pascal code to realise Quite command in test.p.
  169.  
  170.  Trivial makes a program where 
  171.   -- resources IDs are listed in CONST list;
  172.   -- templates of procedures to support some types (DLOG,MENU,WIND, etc.) of 
  173.      the resources are introduced;
  174.   -- some other templates for standard procedures such as Mac managers
  175.      initialisation and event loop, program header and program body are appended;
  176.  etc.
  177.  
  178. To generate a name, Trivial gets comment for resource from the resource
  179. description. So, to provide readable code, you should write comments for each of
  180. resources. Trivial ignores any character, which is not appropriated for
  181. identifier, adds letter prefix if resource comment begins from digit and so on.
  182. But if you dislike a number of such names you are able to use test.Dict that is
  183. dictionary file for renaming by Canon MPW command. To generate procedure
  184. templates Trivial uses, pattern files :
  185.  
  186.     MainLoop.Trivial
  187.     MakeMenu.Trivial
  188.     MenuComm.Trivial
  189.     Uses.Trivial
  190.  
  191. which look like well-known examples from Inside Macintoch. You can modify these
  192. files to get necessary result of generation. Also, there are another goodies to
  193. simplify  your programming work. For example, Trivial copies Uses template with
  194. alphabetical list of standard units, you can simply uncomment the necessary of
  195. them. You can add names of your own units to Uses.Trivial file, etc.
  196.  
  197. Trivial inserts placeholders (%%-markers) where programmer should insert or
  198. modify source code. However, in some cases the generated program pattern may  be
  199. compiled, linked and executed successfully (for example, run the test application,
  200. which was built by test.make file, from test.p gotten from Trivial's output as
  201. is). Of course, the  test does not make any useful works -- it's pattern only,
  202. but it's valuable pattern -- it runs without run-time errors!
  203.  
  204. There are many options to control generation. By default Trivial generates the
  205. most complete source, but for some tasks, for example, when your program has been 
  206. written already and you need to insert there additional constant list, the full
  207. text generation may be too redundant -- too large parts of the text you would
  208. erase by hand. In similar cases you can suppress generation of the parts by
  209. option's  setting. To help your orientation -- which option defines which part
  210. generation,  the parts of generated source begins from comments like this:
  211.  
  212. {%% Generation option: -i}
  213.  
  214. NOTE : The number of resources may be used for generation  is very restricted
  215. for current version of Trivial (Not more 20 resources in resource file is possible).
  216. Next  version will be free from this limitation.
  217.  
  218. -----------------------------------------------------------
  219.  
  220. About the author.
  221.  
  222. Michael Trofimov is a computer scientist, chemist and programmer. He works in
  223. Lab of Computer Chemistry, N.D.Zelinsky Institute of  Organic Chemistry of
  224. Academy of Sci of Russia. Also he makes independent researches and commercial
  225. programs development.
  226.  
  227. He works 15 years in computer areas, among his works:
  228.  
  229. -- Real-time system for ESR spectroscopy;
  230. -- Scientific program EDIP, to solve index-property problem for organic
  231.     compounds;
  232. -- Algorithms for applied tasks of graph-theory;
  233.  
  234. -- Graphics  Library for Extended Pascal compiler,
  235.     (Visible Software Co., DE, USA; Prospero Software Co. UK);
  236. -- Dr. Pascal integrated environment porting -- from IBM PC to Mac, Mac oriented
  237.     language sensitive editor and interface of Dr. Pascal (Visible Software);
  238.     
  239. etc. (see also 'Other MT2 software' file).
  240.  
  241. He is author of more than 50 papers in Russian and international journals (First
  242. Class; Byte; J.of Pascal, Ada  & Modula-2; J.of Mathematical Chemistry; etc.) 
  243.  
  244. The MT2ToolKit was planned as accumulation of author's experience of
  245. methods to solve tasks of practical programming. Author uses it permanently in
  246. his works, and  so consequently improves and develops it.
  247.  
  248.  
  249. -----------------------------------------------------------
  250.  
  251.  
  252.  
  253.