Copyright: ® Corsoft Corporation


Help Contents
Contents

Overview

 Introduction

 CorEdit Quick Start

 Product Support

Using CorEdit

 Using the Editor

 Project Management

 Compiling Script Files

 Debugging Scripts

 Using SYN files (User-defined functions and subroutines)

 Using the SYN Editor

 Syntax Structures and Command Functions

 Changing Preferences

 Window Arrangement

Other Help Topics

 Toolbar and Keyboard Shortcuts


 Introduction

CorEdit is an developer's workbench that assists in developing ObjectView™ based applications.  It interfaces with ObjectView™ Compiler and Resource Manager to help make an integrated environment.

CorEdit, on installation, renames your existing ObjectView™ Compiler interface from ObvComp.EXE to ObComp.EXE.  This has to be done for two reasons:

1.	To ensure the switching capability between the ObjectView™ screen editor and the CorEdit scripting environment (Using F5 toggle key)

2.	To ensure that CorEdit can call ObjectView™ compiler to compile the scripts in a well integrated fashion

CorEdit installation creates a sub directory within ObjectView™ directory called ..\CORSOFT.  It copies ObjectView™ Compiler and CorEdit Interface in that sub directory.  It also copies a utility: CorSwitch (CorSW.EXE) within this sub directory.  CorSwitch provides for switching back and forth between two editors: CorEdit and ObjectView™ Compiler interface.

CorEdit does not support trace level debugging at the present time.  To enable trace level debugging, use CorSwitch utility to switch back to ObjectView™ Compiler interface.


 CorEdit Quick Start

CorEdit is an integrated scripting environment for ObjectView™.  Excluding the ability to perform trace level debugging, it supports all existing features in current ObjectView™ Compiler interface.  The following is a list of various features beyond the ones supported by the current shipping ObjectView™ compiler interface:

Related Topics:

 Multiple Document Interface Support

 Support for code greater than 32KB

 Unlimited Undo Support

 Tool Bar Support

 Status Bar Support

 Right Mouse Button Support

 Object Names Support

 Drag and Drop Support

 ObjectViewÔ Help Support

 Code Color Support

 Syntax Help Support

 Code Compilation Support

 Project Management Support

 Integration with ObjectViewÔ Resource Manager

 Customization Support

 Coding Facilities Support

 CorSwitch Support


 Multiple Document Interface Support

Enables opening multiple files at the same time.  Besides any other ASCII file types, it provides capability to view and edit various types of ObjectView™ development files, including:

•	ObjectView Script Source (.OBS) file

•	ObjectView Source Include (.INC) file,

•	CorDoc Cross Reference (.XRF) file,

•	Visual Query Statement (.QRY) file,

•	ObjectView Report Template (.OBF) file,

•	ObjectView Compiler Syntax (.SYN) file,

•	ObjectView MakeRun List (.LST) file


 Support for code greater than 32KB

CorEdit provides the capability to open, Create or edit files greater than 32KB in size.  The size of the file that can be opened or edited is limited to the available Windows memory, and could vary from one system to the other.


 Unlimited Undo Support

CorEdit provides support for unlimited Undo operations.  There is no limit on the number of undo actions.  However, each undo action cannot address more than 32KB of data.

Unlimited Undo operation enables user to retrace the steps back.  Note: You can have multiple undo actions for data not exceeding 32KB in size.


 Tool Bar Support

Tool bar provides capability for the more commonly used functionality.  Moving the mouse cursor over the tool bar items provides help for the tool bar action within the status bar.


 Status Bar Support

Status bar provides a central location for standard response from user activity, like, mouse cursor movement over various items in the tool bar, status bar, etc.  The status bar also provides capability to show the state of the system with respect to CAPS Lock, NUM Lock, INSert Mode / OVeRwrite mode, Line and Column position of the cursor within the active file, etc.  The state of the system can be toggled for CAPS Lock, NUM Lock and INSert Mode / OVeRwrite mode by double-clicking in the status bar over the designated state respectively.


 Right Mouse Button Support

Right mouse button support provides two capabilities:

•	Clicking the right mouse button within an open script (.OBS) file, will display the corresponding object names from the ObjectView™ Screen (.OBV) file.

•	Right mouse button click within the application and outside of any open document window, enables Syntax Help (Commands) dialog.

Both of the above dialogs are well integrated to permit plug and play coding capability.

For any ObjectView™ command that uses object name as a parameter, double clicking on the object name parameter will select the parameter, click on right mouse button will display object names from corresponding screen (.OBV) file, that can be copied directly on to substitute the parameter name.  Note: This assumes that there exists an active script (.OBS) file, for which there also exists an ObjectView™ screen (.OBV) file, when the ObjectView™ syntax help for commands was activated.


 Object Names Support

Clicking the right mouse button within an open script (.OBS) file, will display the corresponding object names from the ObjectView™ Screen (.OBV) file.  Note: This information is retrieved from the ObjectView™ Screen (.OBV) file that is saved on the disk.  It will not display newly created objects on the screen unless the screen is saved to the disk.

Object names are also available while you generate Method, SUBroutine or FUNCTION by clicking a button with '>>' button from within Method option within Syntax menu.


 Drag and Drop Support

Dragging an ASCII file from Windows File Manager and dropping over CorEdit will activate CorEdit and open the file in a new window.  This is a good way to select multiple files and open them simultaneously by dragging and dropping them from File Manager over to CorEdit.

CorEdit can also be 'associated' with various different types of ASCII files for viewing and editing within file manager.  Double clicking on the file within Windows File Manager would accomplish the same action.


ObjectViewÔ Help Support
 ObjectView™ Help Support

CorEdit provides the support for the standard Help key.  Pressing F1 key (or Shift+F1) invokes the search dialog for ObjectView™ Help.  If the cursor position is over an ObjectView™ Command, it will display its specific help.


 Code Color Support

CorEdit provides verb sensitive coloration for ObjectView™ script files (.OBS) and include files (.INC).  All other files are displayed in Black character set over White background.  A new file will also allow for color coding of ObjectView™ reserved words.

Sensitive Color-Coding tremendously improves usability, readability and coding.  By default, it follows the standard coding coloration as followed in other leading integrated development environments.  However, it can be customized to suit users' preferences by selecting various available settings in options menu.


 Syntax Help Support

ObjectView™ provides support for creating and reusing user defined functions and subroutines via the use of syntax help.  Syntax Help for commands dialog also provides a well integrated capability to view comments, search functions and subroutines, substitute parameters and copy the user defined function/subroutine almost as if it were part of ObjectView™ command or function.  This is accomplished by generating a SYNtax file.

CorEdit provides capability to generate and edit SYNtax file graphically.  It also offers improved SYNtax file generation by appending the SYNtax file to an existing SYNtax file when regenerated, without overwriting existing user defined comments or modifications.  It provides a capability to associate syntax files and Windows Help files at any location (drive and/or directory path) from users working environment.


 Code Compilation Support

CorEdit uses ObjectView™ Compiler for code compilation.  This is accomplished by passing a filename as a command line parameter to ObjectView™ Compiler interface.

CorEdit provides exactly the same support for command line parameter passing as ObjectView™ Compiler Interface.  Refer to ObjectView™ documentation for details.


 Project Management Support

CorEdit provides facilities to create and manage projects.  The project helps maintain application development.  An entire application can be considered as one project.  This makes application code management easy.  All files in a project can be forced compilation (even if various files may be up to date) at the same time.  Alternatively, CorEdit provides an ability to avoid compilation if the file is up to date.

A project maintains dependency checking and thus enables auto compilation of the script files in a project affected by some induced changes in source.  Example: Modifying an INClude file necessitates recompiling all script (.OBS) files where this file is included.  This can be accomplished by managing code within a project.

CorEdit provides an ability to migrate existing .LST file (generated by ObjectView™ Resource Manager) to define a Project (.PRJ) file and vice versa.  CorEdit has an ability to remember up to four last opened projects.


Integration with ObjectViewÔ Resource Manager
 Integration with ObjectView™ Resource Manager

CorEdit has integration with ObjectView Resource Manager (MakeRun).  This provides the ability to generate an .OBR file from within a defined project.

CorEdit also provides an ability to determine the need for compilation if some of the files within the project are not up to date when you attempt to use this integrated feature.


 Customization Support

CorEdit can be customized to users' specifications in reference with:

•	Code Coloration and font

•	TAB setting

•	Ability to display the number of last opened files under File menu

•	Code Compilation settings

•	Project Compilation settings

•	Generate a .LST file or generate a deliverable (.OBR)


 Coding Facilities Support

The following additional facilities are supported:

Validate the opened file if it is out of date or has been modified by other application.

Support for Auto-Indentation: Ability to type at any column position in a line without tab/space.

•	Ability to open or set any open file as read-only to prevent further modification to it.  You can select, scroll and copy data out of it without making any modifications to it.

•	Ability to easily align code by selecting multiple lines and applying TAB key to move right and SHIFT-TAB to move left.

•	Ability to covert multiple lines of code as comments and vice-versa by selecting multiple lines and applying CTRL+M and CTRL+SHIFT+M.  It is also supported via options in Edit menu.

Support for Line and Column numbers (especially for caret position).

Support for checking all errors via 'Output' window on compilation.


 CorSwitch Support

CorEdit provides support for compiling the code in both: Release mode as well as Debug mode.  However, it does not support trace level debugging.  In order to allow for trace level debugging provision, users can revert back to ObjectView™ Compiler interface.

To facilitate switching back and forth between CorEdit and the ObjectView™ Compiler interface, Corsoft provides a utility called CorSwitch.  It maintains both the interfaces within a sub directory and manages to copy appropriate files to switch between CorEdit and ObjectView™ Compiler interface.  Note: Since it copies the appropriate files in either case, CorSwitch should only be executed when either interface is not being used.  CorSwitch does check to ensure neither interface is running when executed.


 Product Support

In United States and Canada, the technical support for all modules of CorUtils for ObjectView™ can be obtained by calling Corsoft Corporation.  CorUtils for ObjectView™ comprises of three utilities:

•	CorEdit: Improved Scripting Environment.

•	CorLib: Enhanced set of function library.

•	CorDoc: Application and Screen documenting tool.

CorUtils for ObjectView™ was developed by Corsoft Corporation.

Corsoft Corporation, 411 Borel Avenue, Suite 507, San Mateo, California 94402

Ph: (415) 286-2870

Fax: (415) 286-2879


 Using the Editor

 File Management

 Print

 Switch from CorEdit to Screen Editor

 Switch from Screen Editor to CorEdit

 Exit

 Undoing Edit Actions

 Cutting, Copying, Pasting and Deleting Text

 File Navigation

 Find or Replace

 Mark or Unmark Comments

 Read Only Action


 File Management

 Creating a File

 Opening a File

 Opening a File by Drag and Drop

 Closing a File

 Saving Files


 Creating a File

The New command creates a new source file.  Creating a source file does not affect other source files you may have open.  To create a new source file:

1.	From the File menu, choose New.  A new source window is opened.  Toolbar shortcut:  or Keyboard shortcut: Ctrl+N.

2.	Type your source code in the new window.

3.	From the File menu, choose Save.  The Save As dialog box appears.  Toolbar shortcut: .

4.	In the Directories box, double-click a directory where you want to store the source file (or down a directory path to the appropriate directory.)

5.	Type a filename in the File Name box, then choose OK.  The default extension is OBS.  You can type in another extension or select one from the Save File as Type combo box.

New files are labeled UNTITLED.n until they are saved.  The n is a sequential number.

The maximum number of characters in a line is 1024; the maximum number of lines in a file is 32,000.

Before you can save or close a window, it must be active.  To make a window active, either switch to the window (by clicking anywhere in it) or choose the window name or number from the Window menu.


 Opening a File

The Open command opens an existing source file.  You can open any ASCII file created with any editor.  To open a file:

1.	From the File menu, choose Open.  The Open File dialog box appears.  Toolbar shortcut:  or Keyboard shortcut: Ctrl+O.

2.	Select the drive and directory where the file is stored.  The default is the current drive and directory.

3.	Set the types of files to display in the List Files of Type combo box.  Files with the chosen extension are displayed in the File Name box.  This box serves as a filter to display all files with a given extension.  The drop-down box lists commonly-used file extensions. The default is .OBS

4.	In the File Name box, click a filename, then choose OK.  Double-clicking a filename is a shortcut.

The names of up to ten most recently opened files are displayed at the end of the File menu.  Amount displayed for most recently opened files can be set within the Option menu under the Editor command.  The range is [1 to 10] files.  To open one of these files, choose its name from the menu.


 Opening a File by Drag and Drop

CorEdit Editor provides Windows conformance with drag and drop capability.  Any ASCII file can be dragged from Windows File Manager and dropped it on CorEdit would open a document window within CorEdit with the dropped file as the active file.


 Closing a File

The Close command closes the active window.  You can close a window in several ways:

•	From the File menu, choose Close.  Shortcut: Ctrl+F4.  This action closes the active window.

•	Double-click its Control-menu box.  When you double-click the Control-menu box, the window is closed.

•	When the window is minimized, use the left mouse button to bring up the Control menu then choose the Close command or press Ctrl+F4.

•	When the window is not minimized, click on the Control-menu box button then choose the Close command or press Ctrl+F4.

Before you can close a window, it must be active.  To make the window active, either click the window or select the window name or number from the Window menu.

If the file has changed, you are prompted with a message indicating that the file has changed.  You have the option: to save, to exit without saving or to cancel the operation.


 Saving Files

The Save command saves a file under the name in the title bar.  This command is unavailable if you have not made any changes.  To save a file:

1.	Make the file active by clicking the source window.  From the File menu, choose Save.  Toolbar shortcut: .

2.	If your file is unnamed, the environment displays the Save As dialog box.  In the File Name box, type the filename.

3.	In the Drives and Directories boxes, select a drive and directory.

4.	Choose OK.

If the file has already been named, the Save command saves any changes without displaying the Save As dialog box.

The Save icon on the toolbar becomes available (not dimmed) when you make any changes in the source file.

To save all open files, choose Save All from the File menu.


 Print

You can print highlighted text or the contents of a source window.  To print highlighted text:

1.	Select the text you want to print.

2.	From the File menu, choose Print.  The Print dialog box appears.  Toolbar shortcut: .

3.	Choose OK.

Text is printed in the default font for the printer.

The Print command also prints the contents of an active window.  An active window is the Window with the current focus.  To print the contents of an active window:

1.	From the Print dialog box within the Print Range section, choose the All option.

2.	Choose OK.

To print a complete file:

1.	From the File menu, choose Print.  The Print dialog box appears.  Toolbar shortcut: .

2.	Choose OK.


 Switch from CorEdit to Screen Editor

To switch to the ObjectView™ screen editor: from the File menu, choose ObjectView™ command.  Toolbar shortcut:  or Keyboard shortcut: F5.

If the ObjectView™ screen editor is not already open, CorEdit will use the active window's file path and instruct the ObjectView™ screen editor to open the corresponding OBV file.  If the .OBV file does not exist, CorEdit will produce a beep and instruct the ObjectView™ screen editor to begin with a blank template file.

If the ObjectView™ screen editor is already open, it will become active.


 Switch from Screen Editor to CorEdit

Switching back from ObjectView™ screen editor can be accomplished by using its Compiler option in File Menu or Keyboard shortcut: F5.

CorEdit will become active with the .OBS file corresponding to the .OBV file in the ObjectView™ screen editor.  If the .OBS file does not exist, CorEdit will prompt a message with an option to create a .OBS file.


 Exit

To exit the editor use one of the following methods listed below:

•	From the File menu, choose Exit.  Keyboard shortcut: Alt+F4.

•	From the Control menu, choose the Close command or press Alt+F4.

•	Double-click the Control menu button.

If any files have changed, you are prompted with a message indicating that the file has changed.  At which point you have the option: to save, to exit without saving or to cancel the operation.


 Undoing Edit Actions

The Undo command on the Edit menu allows you to "undo" previous edit actions.  The number of edit actions is virtually unlimited.  However, it does depend on the amount of Windows memory the machine has.  To undo an editing action:

•	From the Edit menu, choose Undo.  Toolbar shortcut:  or Keyboard shortcut: Ctrl+Z or Alt+BackSpace.

The Clear Undo Buffer command clears the undo buffer.  This means, you cannot undo any edit actions up to this point.  To clear the undo buffer:

•	From the Edit menu, choose Clear Undo Buffer.  A popup message is displayed confirming the clearing of the undo buffer.


 Cutting, Copying, Pasting and Deleting Text

The Cut command "deletes" selected text from the active window and copies it to the Windows Clipboard.  The Copy command "copies" selected text from the active window to the Clipboard.  With each command, you can then paste the text to another location, file, or application.  To paste text:

1.	Select the text you want to paste.

2.	From the Edit menu, choose the Cut or Copy command.  Cut: Toolbar shortcut:  or Keyboard shortcut: Ctrl+X.  Copy: Toolbar shortcut:  or Keyboard shortcut: Ctrl+C.  Paste: Toolbar shortcut:  or Keyboard shortcut: Ctrl+V.  Alternatively, you can also use Shift+Del, Shift+Ins and Ctrl+Ins for Cut, Copy and Paste action respectively.

3.	Place the insertion point in any source window where you want to insert the text.

4.	From the Edit menu, choose the Paste command.  Paste: Toolbar shortcut:  or Keyboard shortcut: Ctrl+V.

The Delete command deletes text without copying it to the clipboard. As with

all editing actions however, you can "undo" a delete with the Undo command

on the Edit menu.

Keyboard Delete action:

Action	Press
Delete current line	Ctrl+D
Delete contents until the end of the current line	Ctrl+E
Delete contents until the end of the current word	Ctrl+T


 File Navigation

 Go to Line method

 Table of Shortcut Keys for Moving in a File


 Go to Line method

Status Bar

You can move to any line number or caret (Cursor) position in a source file.  Line number moving move the cursor at the beginning of the text of the line number specified in the Go to Line dialog box.  Caret position finds the current position of the cursor and adjusts the window accordingly.  Steps to navigate from the menu:

1.	From the Edit menu, choose Go to Line command. The Go to Line dialog box appears.

2.	In the Number box, type a line number or check the Go to Caret Position check box.

3.	Choose OK.  If you type a line number greater than the last line in your source file, the editor moves to the end of the file.

Steps to navigate from the status bar:

1.	Double-click on either the current line number or current column number field within the status bar.

2.	In the number box, type a line number or check the go to caret position check box.

3.	Choose OK.  If you type a line number greater than the last line in your source file, the editor moves to the end of the file.


 Table of Shortcut Keys for Moving in a File

The editor includes a number of special keystrokes for editing and moving around in a source file.  These are in addition to the familiar ARROW keys, the SPACEBAR, and the ENTER key.  The editor supports auto-indentation, which means, a new line (on hitting ENTER) will always start from the same column (character) position as the line above.

To move to	Press
Word to left	Ctrl+Left
Word to right	Ctrl+Right
Beginning of current line	Home
End of current line	End
Beginning of file	Ctrl+Home
End of file	Ctrl+End


 Find or Replace

 Finding Text

 Replacing Text


 Finding Text

The Find command searches the active window for a text string.  You can:

•	Find a whole word match.  This "find" matches all occurrences of a text string not preceded or followed by an alphanumeric character.

•	Find a case-sensitive match.  This "find" searches for text that matches the capitalization of the text string.

•	Direct the direction (up or down) of the search from the current cursor position.

To find a text string:

1.	Position the insertion point where you want to start your search.  The editor uses the location of the insertion point to select a "default search string."

2.	From the Edit menu, choose Find.  The Find Dialog appears.  Toolbar shortcut:  or Keyboard shortcut: Alt+F3.

3.	Type the search text in the Find What box.  Select any of the Find options.

4.	Choose the Find Next button to begin search.  Use Find Next button to find next occurrence of the selected string.  Note: use F3 for finding the next occurrence of search string contained in search buffer after canceling Find Dialog box.


 Replacing Text

The Replace command searches the active window for a text string and replaces it with another text string. You can specify:

•	Find a whole word match.  This "find" matches all occurrences of a text string not preceded or followed by an alphanumeric character.

•	Find a case-sensitive match.  This "find" searches for text that matches the capitalization of the text string.

To replace text:

1.	Position the insertion point where you want to start your search.  The editor uses the location of the insertion point to select a "default search string."

2.	From the Edit menu, choose Replace.  Toolbar shortcut: .  The Replace dialog box appears.

3.	Type the search string in the Find What box.  The string to be changed.

4.	Type the replacement string in the Replace With box.  The string that will replace the search string.

5.	Select any of the Replace options.  Choose the Find Next button to begin search.  Use Find Next button to find next occurrence of the selected string.

6.	To replace the highlighted text, select the Replace button.  This will replace the text and advance the cursor to the next occurrence of the search string.  To replace all occurrences of the string, select the Replace All button.


 Mark or Unmark Comments

The Mark and Unmark commands on the Edit menu allows you to "comment" and "un-comment" selected text.  To mark comments:

1.	Highlight the text that you want to comment.  Note: if no text is selected the mark command will comment the current line.

2.	From the Edit menu, choose Mark Comment.  Toolbar shortcut:  or Keyboard shortcut: Ctrl+M.  The text gets commented.

To unmark comment:

1.	Highlight the text that you want to un-comment.  Note: if no text is selected the Unmark command will un-comment the current line.  Also note that if no comment exist on the line or within the select text no action is taken by the editor for that line.

2.	From the Edit menu, choose Unmark Comment.  Toolbar shortcut:  or Keyboard shortcut: Ctrl+Shift+M.  The text gets un-commented.


 Read Only Action

The Read Only command makes the current window read only.  When you choose this command, the file cannot be edited.  To make a source window read only:

1.	Make the window active by clicking it.

2.	From the Edit menu, choose Read Only.  To undo the command, choose it again.

A check mark next to the menu command indicates that a source file is read only.  This command is useful when you are viewing a source file and want to avoid making accidental changes to the file.  If you open a read only disk file, the Read Only command is automatically checked.  To edit a version of the file, clear the Read Only command, make your edits, and then save the file under a different name.


 Project Management

Projects define the collection of files for a single application.

Related Topics:

 Create New Project

 Open Project

 Edit Project

 Close Project

 Switching to other Projects


 Create New Project

The New command under the Project menu creates a new project file.  A project can be viewed as your basic application.  Once a project is created, you manage the application's files within the project.  The project establishes the dependency relationship with all the files in your application.  Project option provides for forced compile for all files as well as an option to recompile only the modified files.  In addition, from a project file you can generate your deliverable file (.OBR file) for your application.

CorEdit also gives you the ability to migrate existing LST files to Project files.  Note: the system path in the LST file must be the same path as where the application files are or the editor will not be able to find the files.  To create a project file:

1.	From the Project menu, choose New.  The New Project dialog box appears.

2.	Type the path name followed by the project's file name in the New Project Name: box.  Note: Use the Browse button, to bring up the Select File dialog box, use this dialog to set the path to where you want the project file to reside.

3.	If you need to migrate an existing LST file, make sure the Migrate existing .LST to .PRJ: is checked.  Then type the path name followed by the LST's file name.  Or use the Browse button as in step 2.

4.	If you do not need to migrate an existing LST file, then make sure to uncheck the Migrate existing .LST to .PRJ.

5.	Click the OK button.

6.	From the Edit Project - XXXXXXXX.PRJ dialog box, where XXXXXXXX is the name of the project file, enter any files that you wish to add to the project.  A file may be added to the project by double-clicking on the selected file in the files list or alternatively, selecting the file and clicking on Add button.  Once you have selected all the files you want in the project, click on the OK button.  The same process is followed when migrating an .LST file to a project.

When a OBX file is added with no corresponding OBS file a message is displayed indicating the addition.

INC file can not be added to the project.  Because the editor is able to locate the INC files that belong to the project by scanning the OBS files.

If you are creating a new project with the same name as an existing project, a warning message is displayed.

The name of the active project is displayed in the title section of the main window.

When a new project is created, any windows that are opened will be closed and if any information has changed in any of the windows the user is prompted with a dialog box with the option to: save or cancel the operation.


 Open Project

The Open command under the Project menu opens an existing project file.  To open a project:

1.	From the Project menu, choose Open.  The Select File dialog box appears.

2.	Select the drive and directory where the file is stored.  The default is the current drive and directory.

3.	In the File Name box, click a filename, then choose OK.  Double-clicking a filename is a shortcut.

The names of four most recently opened project files are displayed at the end of the Project menu.  To open one of these files, choose its name from the menu.

When a project is opened, any windows that are opened will be closed and if any information has changed in any of the windows the user is prompted with a dialog box with the option to: save or cancel the operation.

Only one project can be open at any time.  Opening another project closes the active project.


 Edit Project

The Edit command under the Project menu allows the editing of the active project.  The active project name is displayed in the title section of the main window and under the Project menu next to the edit command.  To edit a project:

1.	From the Project menu, choose Edit.  The Edit Project dialog box appears.

2.	From this screen you can add files to or delete files from the project.  When you are done click on the OK button.

The names of four most recently opened project files are displayed at the end of the Project menu.  To open one of these files, choose its name from the menu.

When an OBX file is added with no corresponding OBS file a message is displayed.

INC file can not be added to the project.  The editor is able to locate the .INC files that belong to the project by detecting dependencies from the OBS files.


 Close Project

The Close command under the Project menu closes the active project.  The active project name is displayed in the title section of the main window and under the Project menu next to the edit command.  To close a project:

•	From the Project menu, choose Close.

The names of four most recently opened project files are displayed at the end of the Project menu.  To open one of these files, choose its name from the menu.

When a project is closed, any windows that are opened will be closed.  If any information has changed in any of the windows the user is prompted with a dialog box with the option to: save or cancel the operation.

When the project is closed, the project's file name is removed from the title section of the main window.


 Switching to other Projects

The names of four most recently opened project files are displayed at the end of the Project menu.  To switch to one of these, choose its name from the menu.  Note: This has virtually the same effect as closing a project then opening another existing project.


 Compiling Script Files

 Compile OBS File

 Compile Project

 Compile All

 Generating OBR and LST Files


 Compile OBS File

The Compile command compiles the script file within the active window.  To compile a script:

1.	Make the window active by clicking it.

2.	From the Project menu, choose Compile.  Toolbar shortcut:  or Keyboard shortcut: F7.  Note: next to the compile command is displayed the file that will be compiled.

When compilation starts an output window is opened up which displays the status about the compilation.  This window has the title: Output and the icon: .

When an error occurs in the script file, CorEdit displays the errors logged within the trace file generated by the ObjectView™ Compiler.  This displays the path and file name, line number and column number where the error might be and a short explanation of the error within the output window.  Double-clicking on the error line within the Output window, brings you to the error location within the script file.


 Compile Project

The Compile Project command compiles the script files that have changed according to the dependency relationship associated with the opened project.  That is, only files that have changed gets recompiled.  To compile a project:

•	From the Project menu, choose Compile Project.  Toolbar shortcut:  or Keyboard shortcut: Ctrl+F7.  Note: Next to the edit option is displayed the opened project file.

When a project compilation starts an output window is created, this window displays status about the compilation.  This window has the title: Output and the icon: .  The editor can be set to stop compiling the files within the project upon encountering the first error or set to continue compiling after the first error.  This is set from the Option menu under the Project command.

When an error occurs during the project compilation, CorEdit displays the errors logged within the trace file generated by the ObjectView™ Compiler.  This displays the path and file name, line number and column number where the error might be and a short explanation of the error within the output window.  Double-clicking on the error line within the Output window, brings you to the error location within the script file.


 Compile All

The Compile All command compiles all the script files regardless of dependency relationship associated with the opened project.  That is, all files get compiled.  To compile all:

•	From the Project menu, choose Compile All.  Toolbar shortcut: .  Note: Within the project menu, the opened project file is displayed next to the edit command.

When a project compilation starts an output window is created, this window displays status about the compilation.  This window has the title: Output and the icon: .  The editor can be set to stop compiling the files within the project upon encountering the first error or set to continue compiling after the first error.  This is set from the Option menu under the Project command.

When an error occurs during the project compilation, CorEdit displays the errors logged within the trace file generated by the ObjectView™ Compiler.  This displays the path and file name, line number and column number where the error might be and a short explanation of the error within the output window.  Double-clicking on the error line within the Output window, brings you to the error location within the script file.


 Generating OBR and LST Files

The make run command generates both an OBR and a LST file unless the option within the Option menu under the project command is set to "Generate LST file only" then only a LST file is generated.  To generate both an OBR and a LST file or a LST file only:

Note: If generating a LST file only, Make Run command within Project menu shows the name of the LST file that will be generated.  Other wise the name of the PRJ file that will generate the OBR and LST files is shown.

1.	Open a project as described in Open Project section, that you want to create an OBR and LST file for.

2.	From Project menu, choose Make Run command.  Toolbar shortcut: .  Select the Main OBV file, for the application, from the dialog box that appears.

3.	Click the Ok button.

A project file must exist to generate an OBR and a LST file.

If any of the scripts have changed within the project, then the editor will call the compiler and have it compile the changed files.

If an OBX file that belongs in the project is not in the specified directory, then the editor will state that.  It will then generate the LST file but not the OBR file.

It is recommended that you compile all your OBS files in release mode (as opposed to debug mode).


 Debugging Scripts

CorEdit provides for compiling in debug mode.  However, CorEdit currently does not support trace level debugging.

Compiling in debug mode can be accomplished by selecting Project command within the Option menu.  In order to perform the trace level debugging of your compiled code in the debug mode, you can use the ObjectView™ Compiler interface.

CorEdit comes with a utility, called CorSwitch, that helps you switch between the two scripting interfaces: ObjectView™ Compiler and CorEdit.

The active compiler interface in use is named ObvComp.EXE.  However, for CorEdit to be operational with its code compilation capability, it renames the ObjectView™ compiler interface as ObComp.EXE.  CorSwitch provides a switching capability to help you with the trace level debugging.  However, CorSwitch will only execute if none of the compiler interfaces is active.


 Using SYN files (User-defined functions and subroutines)

SYN files offer a powerful functionality that lets the user avoid some major programming pitfalls, by letting the user define their own user-defined functions and subroutines and being able to incorporate these into the scripting environment.  Advantages of writing user-defined functions and procedures are:

•	Allows users to add their own subroutines and functions to the standard syntax command dialog

•	Write sharable modules

•	Customize the Syntax Help dialog box

•	Associate a Windows Help file (.HLP file) to a function or subroutine with context sensitive help

How to use the SYN functionality:

1.	Write the user defined functions and subroutines that you want to share with others and save the code to an OBS file.

2.	Compile the OBS file in debug mode.  To compile in debug  mode from the Option menu, choose Project.  The Project Options dialog box appears.  Within the Compile Script section click on the "Compile in Debug Mode" option then click on the "Generate Custom Syntax .SYN" option.  Click on the OK button.

3.	Compile the script.  After compilation a SYN file gets generated with the same prefix as the file you just compiled.  Note: the Output window indicates a SYN file was generated.

4.	Undoing what was done in step 2; from the Option menu, choose Project.  From the Project Options dialog box within the Compile Script section un-check the "Compile in Debug Mode" option this will also un-check the "Generate Custom Syntax .SYN" option.  Click on the OK button.

5.	Compile the script again.

6.	Choose the Edit SYN file option in Syntax menu.  Select the generated SYN file from the appropriate drive and directory.  (By default, you should see it in the current directory).  This brings up the Edit - XXXXXXXX.SYN dialog, where syntax for each function/subroutine in the OBS file is listed with its appropriate parameters.  You may feel free to edit the parameters, return codes, and above all, add your specific comments about each function or subroutine and update every modification before selecting another function/subroutine.  You can always delete a subroutine/function from the available list if so desired.  Accept all changes made by clicking on the OK button.

7.	From the Syntax menu, choose Commands.  Keyboard shortcut: Ctrl+S or Right Mouse Button within the parent window's client area.  The Syntax Help (Commands) dialog box appears.

8.	Click on the Custom... button.

9.	Choose the SYN or HLP file you want to add to your environment.  Click on the OK button.  Note: The Edit User Syntax File List dialog box allows you to associate HLP and SYN file to your editor environment.

10.	Now within the type section check User Functions and User Subroutines.  Your functions and subroutines should appear in the list with your specified comments.

11.	Now you can copy/paste your functions or subroutines into the code just as you have always done with the system commands and functions.  When you copy a user defined function or subroutine, it will add an appropriate declaration for the same as the first line in your script environment.  This will be preceded by 'EXTERN' and followed by the name of the OBX file that was generated by the OBS file within quotes.  This concept, in ObjectView™,  is referred to as OBXDLL.  Refer to your ObjectView™ documentation for further details.

To edit the SYN file see section Using the SYN editor.

To generate a SYN file you must be in debug mode.

When using the make run command it is recommended that you compile all the script files in release mode (as opposed to debug mode).


 Using the SYN Editor

The SYN editor allows you to edit SYN files.  Within the editor one can delete references to user-defined functions and subroutines, and one can add or update syntax structures or comments pertaining to user-defined functions or subroutines.

How to use the SYN Editor:

1.	From the Syntax menu, choose Edit SYN File.  The Select File dialog box appears.  Select the SYN file to edit.  Click on OK button.  This places you into the SYN editor.  The Windows title is "Edit - XXXXXXXX.SYN where XXXXXXXX = the name of the SYN file.

2.	From the SYN Editor you can delete references to user-defined functions or subroutines.  You can change the Syntax of the command or add comments about the command.

Note: Adding to the command does not delete the existing text.


 Syntax Structures and Command Functions

 Using all Commands and Methods

 Defining Syntax Statements in Script File

 Defining Data types in Script File

 Screen Object List Usage


 Using all Commands and Methods

Commands... option:

The Commands option in Syntax menu brings up the Syntax Help (Commands) dialog box.  This dialog box displays the functions/commands available to the user according to what is checked in the Type section.  This dialog box is shown below:

How to Use:

1.	Place cursor where to copy functions or command within script file.

2.	From the Syntax menu, choose Command.  The Syntax Help (Commands) dialog box appears.  Keyboard shortcut: Ctrl+S or Right Mouse Button within the parent window's client area.

3.	Choose the command you want to use in your script from the command list box.

4.	Within the Syntax: sections type over the parameter(s) with ones you use in your script file.  Alternatively, for object names to be substituted within a command, you can always double-click on the object name parameter within a function.  This selects the object name parameter in reverse video.  Follow this with a right mouse click.  This pops up the Objects dialog with the list of all available objects in the .OBV file corresponding to the active .OBS file.  The Object name can be copied directly into your Syntax Help (Commands) dialog.

5.	Select copy button to copy the command.

Syntax Help (Commands) Dialog Box

Explanation of Object on Syntax Help (Commands) dialog box:

•	Functions/Commands - Active function/command and list of available functions or commands.

•	Syntax - Syntax structure for the active function/command.

•	Comments - Usage and parameter definition.

•	Type - What type of functions/commands to show in the Functions/Commands list box.

•	Copy Button - Copies syntax to active file.

•	Cancel Button - Exit syntax help without taking any action.

•	Custom... Button - Method to associate user defined functions and subroutines to the editor environment.  See How to use SYN files (User-defined functions and subroutines) section.

•	Help Button - Brings up help file for the active command.

•	Comment / Shrink - Expands or contracts the Comments edit box within the Syntax Help (Commands) dialog.

Method... command:

The Method command copies methods into the script file.

How to Use:

1.	Select Method from the Syntax menu option.

2.	In the Method Name input box, type the name of a subroutine to create.  Or use [image] to bring up the Object dialog box which list all the objects defined in the OBV file corresponding to the OBS file, choose copy to copy the object to the Method Name input box.  See Screen Object List Usage section.

3.	Select the type of structure to copy to the script file within the Type section.  Method - generates a skeleton subroutine with a select statement filed with events chosen from the event list box.  Sub - generates a subroutine skeleton.  Functions - generates a function skeleton.

4.	Select the Event Type category from the Event Type combo box.

5.	Select an event to be trapped in the subroutine by clicking on an event from the Events List and then click on Add.  Double-clicking on the event has the same effect.  Repeat this step for as many events to trap.  To remove an event from the Event List, select the event then click Delete.  To clear all events from the Events List box, select Clear All.  Note: $Events.INC is automatically included into the script file if it is not already there.

6.	Select the Copy button.

$Events.INC is automatically included into the script file if it is not there already.


 Defining Syntax Statements in Script File

The Statements command generates the standard logic statements defined within the view script language.  To use:

1.	From the Syntax menu, choose Statements command.

2.	Choose the logic construct from the Statements box.

3.	Click on the Copy button.

Logic statements supported:

•	If - End If

•	If - Else

•	For - Next

•	While - Wend

•	Select - End Select

•	Do - Until

•	Do - Loop


 Defining Data types in Script File

The Declare command copies data type declarations into the script file.

What can be copied and how to:

1.	Place cursor in script file where the paste should take place.

Copy DLL:

2.	From the Syntax menu, choose Declare menu.  From the Declare menu, choose DLL command.

3.	Choose DLL Type and Procedure Type.

4.	If (DLL Type = Windows) then enter Procedure name, DLL Name, use [image] button to search for DLL files, and DLL Procedure Name.  Click on Generate button.  Else enter Procedure name and Script Name (OBX File) use [image] button to search for OBX files.  Click on Generate button.

Copy Const:

2.	From the Syntax menu, choose Declare menu.  From the Declare menu, choose Const command.

3.	Enter Constant Name, choose Constant Type and enter Constant Value.

4.	Click on Generate button.

Copy Record:

2.	From the Syntax menu, choose Declare menu.  From the Declare menu, choose Record command.

3.	Enter Variable Name and enter Record Type.

4.	Click on Generate button.

Copy Array:

2.	From the Syntax menu, choose Declare menu.  From the Declare menu, choose Array command.

3.	Enter Array Name, choose array type from Type List, if applicable enter array Length and Range.

4.	Click on Generate button.

Copy Record Type:

2.	From the Syntax menu, choose Declare menu.  From the Declare menu, choose Record Type command.

3.	Enter Type Name.

4.	Enter Element Name and choose Element Type, click on Add button.  Repeat until done adding elements to the data structure.  To clear all click on Clear All button.  To remove one element highlight the element in the Elements of Records section and click on Delete button.

5.	Click on Generate button.


 Screen Object List Usage

The Object command displays all or selected object names corresponding to the script's OBV file.  And selected objects can be copied to the OBS file with or without double quotes.  This command is useful in providing a lookup capability for the names of objects in the corresponding OBV file.  Since the object name is copied, it also avoids any errors caused by typing.

How to Use:

1.	Place cursor in script file where paste should take place.

2.	From the Syntax menu, choose Object command.  Mouse shortcut: use right mouse button within the OBS file.

3.	Choose the object Type to display.  Check or un-check Double Quotation check box according to your preference.

4.	Select the object name to copy.  Click on the Copy button.  Note: Double-clicking on the object name within the object list has the same effect as the Copy button.

Object names listed in the Objects dialog are retrieved from the .OBV file saved on the disk.  Therefore, this list will not be able to display newly created objects unless the .OBV file is saved.  Click on Refresh button to refresh the object list.


 Changing Preferences

 Change Project Settings

 Change Editor Settings

 Set Font and Font Size

 Change Syntax Colors


 Change Project Settings

The Option>>Project... command pops up the Project Options dialog box.  From this dialog box  the project options can be set.

Project Options Dialog Box

Available options:

Compile Script Section:

•	Compile in Debug mode - Instructs the editor to compile OBS files in debug mode.

•	Generate Custom Syntax .SYN - Generates a SYN file from the OBS file.

•	Save before compilation - Saves the OBS file before compilation begins.  Having this option un-checked will compile the file on disk not the file that is being edited.

•	Minimize 'Output' if no errors on compilation, this option instructs the editor to minimize the output MDI window after code compilation.

Project Section:

•	Stop compiling if found an error - The editor will stop compiling the remaining files in the project upon encountering the first error.  With this option un-checked, the editor will continue with the compilation process for the entire project and list all errors encountered during compilation of all script files within the project.

Make Run Section:

•	Generate .LST file only - Generates a LST file only, when the make run command is executed under Project menu.

Note: The editor compiles files NOT the text in the windows.


 Change Editor Settings

The Option>>Editor... command pops up the Edit Options dialog box.  From this dialog box the editor options can be set.

Configurable options:

Tab Settings:

•	Tab Stops - Sets the tab spacing within the environment to the value specified within the input box.

Recently Open:

•	Nb. of Files - Sets recently open file list under the File menu to the value specified within the input box.  Valid values are from 1-10.  Other values will not be accepted.


 Set Font and Font Size

The Option>>Font... command pops up the Font dialog box.  From this dialog box the editor font and font sizes can be set.  This will set the selected font for the entire environment.  Only fixed pitch fonts in regular style are supported.


 Change Syntax Colors

The Option>>Color... command pops up the Color Options dialog box.  From this dialog box the editor's syntax coloring can be set.

Changing syntax coloring:

1.	From the Option menu, choose Color command.

2.	Select the item to color.  Select the Foreground and Background colors.

3.	Click on the OK button.

Default - Set the color scheme to the default.

Syntax-Coloring - Toggles the color syntax on or off.  Note: Only new windows are affected by this setting.  All open windows remain unaffected.

View the color setting in the Color Sample area.  The color configuration can be customized for each category specified in the Items list.


 Window Arrangement

Arranging windows and icons in different ways can be done through the Window menu.  Window and icons can be arranged in different ways using the methods described below:

•	The Cascade option enables the user to overlap windows so that each window's title remains visible.  If any icons are present, they will be arranged.

•	The Tile Horizontally option enables the user to re-size and arrange windows without overlap so that each window is wider than it is long.  If any icons are present, they will be arranged.

•	The Tile Vertically option enables the user to re-size and arrange windows without overlap so that each window is longer than it is wide.  If any icons are present, they will be arranged.

•	Arrange minimized windows with the Arrange Icons option.

•	Closing all window can be achieved using the Close All option.  Note:  If the file has changed, you are prompted with a message indicating that the file has changed.  You have the option: to save, to exit without saving or to cancel the operation.

•	The Output option activates the output window.  The output window is the means by which the editor communicates compilation information to the user.

•	Activating other windows can be achieved using the active window selection section within the Window menu.  This section will expand as more file are opened and contract as more file are closed.  The check mark at the beginning of the file name by the number indicates the active file.


 Toolbar and Keyboard Shortcuts

To	Toolbar	Keyboard	Mouse
Create a new source file.		Ctrl+N
Save a source file.
Open a source file.		Ctrl+O
Close a source file.		Ctrl+F4
Print a source file.
Switch to the ObjectView™ screen editor.		F5
Exit the Editor.		Alt+F4
Undo previous editing action.		Ctrl+Z or Alt+BackSpace
Cut text.		Ctrl+X
Copy text.		Ctrl+C
Paste text.		Ctrl+V
Delete current line.		Ctrl+D
Delete contents until the end of the current line.		Ctrl+E
Delete contents until the end of the current word.		Ctrl+T
Word to left.		Ctrl+Left
Word to right.		Ctrl+Right
Beginning of current line.		Home
End of current line.		End
Beginning of file.		Ctrl+Home
End of file.		Ctrl+End
Select all.		Ctrl+Home Shift+Ctrl+End
Find text string.		Alt+F3
Find and replace text.
Comment selected text.		Ctrl+M
Un-comment selected text.		Ctrl+Shift+M
Switch to other MDI screens.		Ctrl+Tab
Compile the active script.		F7
Compile the current project.		Ctrl+F7
Compile all scripts for the current project
Run the make run command.
Command dialog box		Ctrl+S	Right
On-Line context sensitive help		F1 or Shift+F1
Find next		F3
Toggle displaying symbol for TAB		Ctrl+Alt+T
Indent selected lines(s)		Tab
Undent selected line(s)		Shift+Tab