home *** CD-ROM | disk | FTP | other *** search
- .TUTORIAL - A real editor; using the [ UNIT ] keyword
-
- Clear the Desktop before loading this file.
-
- The first thing you'll notice is that three related files were loaded
- along with the definition file. Since this program is going to be a
- real editor, we need some real code.
-
- +-INC-++-VIR-++-EVT-+
- | || || |
- | || || |
- +-----++-----++-----+
- +========DEF========+
- | |
- | |
- +===================+
-
- If SHAZAM sees any of these files in the same directory as the
- definition, an {$I} include statement for it is inserted in the
- generated application.
-
- The *.VIR and *.EVT files are always scanned during the generate
- process, to extract method and event names.
-
- *.INC - General purpose code.
-
- We need a dialog to take of any error or other messages produced by
- the EDITORS unit/objects.
-
- *.VIR - Application methods
-
- Any type of method (usually VIRtual) can be put in the file . In
- this case, we need to initialize the BUFFERS unit and set the
- procedure pointer from the EDITORS unit.
-
- See the METHODS documentation for details on "Pre/Post" "Init/Done".
-
- *.EVT - Application Events
-
- Here we define the only application-level event, so we can open
- files. Both the command constant (cmXX) and HandlecommanD event
- (hdXX) have the same name, but different prefixes (ie: Open causes a
- pair of matching names - the "cmOpen" symbol and "hdOpen" routine).
-
- The [ UNIT ] Keyword
-
- All you do is list unit names for the program's USES clause. This
- list is also used to generate the list of units to be overlaid, and
- to specify whether the unit has a "RegisterUNITNAME" procedure. (See
- KEYWORD section for more detail.)
-
- @PA - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- [ UNIT ]
- General /r @@ Use & register
-
- [ SUBMENU ] File ;;file management
- Open ;;open a file @@ *.EVT file
- Save ;;save current window @@ EDITORS.PAS internal
-