The Hammer FAQ/Manual V1.2


This combined FAQ and manual is a quick attempt at documentation of the Hammer while a more formal manual and/or helpfile is created. At present, I am just trying to get as much information down as possible, so the formatting, grouping of topics, etc is pretty poor. Later this will be split into a proper FAQ and Manual. As both the Hammer and my knowledge of it are changing rapidly, not all of this information may still be (was ever?) correct.

Index

  1. Getting Started
    1. Where can I get the Hammer?
    2. How should I install the executable version?
    3. How do I un-install the Hammer?
  2. Hammer Components
    1. Edit Window
    2. Code View
    3. File View
    4. Smart Dos Box
    5. Class Reference
    6. ASDB Compiler
  3. Auto-Suggestion Capabilities
    1. Objects Auto-suggestion
    2. Procedure/Function Auto-suggestion
    3. Call Creator
    4. Using Autosuggestion Lists
    5. Other Suggestion Lists
  4. Menus and Toolbar
    1. File Menu
    2. Edit Menu
    3. Options Menu
    4. Build Menu
    5. Tools Menu
    6. Window Menu
    7. Help Menu
    8. Toolbar
  5. Editor Commands and Shortcut Keys
    1. OverView
    2. Common Commands
  6. Trouble Shooting
    1. How do I jump to an object from the CodeView?
    2. Why doesn't the mouse work on auto-suggest lists?
    3. How do I configure the Hammer?
    4. How do I control the auto-change of Case on Keywords?
    5. Why doesn't the CodeView tree update when I add a procedure?
    6. How do I export and import my Shortcut-key definitions?
    7. The Hammer crashes when i start it, what gives?

1. Getting Started

1.1 Where can I get the Hammer?

The Hammer is an open source project, hosted at the VDF Guidance website http://www.vdf-guidance.com/

1.2 How should I install the executable version?

Download the setup file from VDF Guidance (see above). Before running this, keep the following in mind.

There are currently some bugs in the Hammer pathing routines that cause problems if the Hammer is installed in a directory path that includes spaces or long files names (Such as "Program Files"). Until these are fixed you should install to a directory that uses standard DOS 8 character pathing. (e.g. C:\KPHAMMER) **WVA: ARE THESE PROBLEMS STILL IN THE HAMMER?

Also, the installation process will create 2 VDF7 workspaces, one is called CodeMax and is used by the Hammer itself. The other one is called VDFLNG and is used by the ASDBC, the program that will fill the autosuggestion database of the Hammer with your (sub)class information.

The location of the workspace is HKEY_LOCAL_MACHINE\Software\Data Access Corporation\Visual DataFlex\7\Workspaces\CodeMax. There is a similar workspace created called VDFLNG with the same keys.

1.3 How do I un-install the Hammer?

Just click on uninstall from the menu or from "Add/Remove Programs" in the configuration panel.

2. Hammer Components

2.1 Edit Window

The edit window is the CodeMax editing component, also used by Data Access in the VDF IDE. All the actual editing is done here. The shortcut keys, syntax coloration and some other features are configurable.

2.2 Code View

The Code View window shows a tree which contains all the components (objects, procedures, functions, etc) of the file being edited. As you move around the edit window, you can synchronize the position in the code view with the "Synchronize CodeView" (Crtl+S) command. The "Code Explorer" (Alt+F1) will jump the focus to the CodeView or FileView, whichever is shown. Continued usage of (Alt+F1) will then switch between the CodeView and FileView tabs. To synchronize the edit with your location in the code view, hit Enter. Tab will return you to the edit window.

2.3 File View

Sharing the same window as the CodeView, but on a different tab, the File View displays a list of all the files that are referenced in the edited file. Pressing Enter on one of these will open the selected file for editing.

2.4 Smart Dos Box

The Smart Dos Box command starts an MSDos prompt that has as it's current directory the AppSrc Directory of your currently selected workspace.

2.5 Class Reference

The Class Reference is a seperate program that is used to maintain and view the Class Reference Database. This section has some bugs in it still. If you get an error about workspace VDFLNG see installation above. You may also get occasional errors about DFEDIT10.DLL, once on startup and many times on entry to the Menu Writer. These are known bugs and will be fixed in future versions of the Hammer.

The Class Reference database holds a list of all known classes, and the properties, methods, and events in each one. This information is used by the Hammer for it's autosuggestion capabilities. The Class Explorer also shows these for all parent classes and mixins, and is a handy reference.

2.6 ASDB Compiler

This compiler runs through the base classes, updating and expanding out the autosuggest database. This should be done when ever the classes change. It is done for you during installation.

3. Auto-Suggestion Capabilities.

3.1 Objects Auto-suggestion

A list with all available objects appears whenever you type a piece of code where you need to enter an object reference. This will be activated by the following statements:

set YourProperty of ...
get YourFunction of ...
send YourMessage to ...

3.2 Procedure/Function Auto-suggestion

A list of all available methods appears whenever you are creating a procedure in an object and helps you to override methods in objects. This will be activated by the following statements:

Procedure ...
Function ...

Note that this is based on your location in the file and also the contents of the class database. If the list does not show, you may be outside of any object, or the database may not know about the current object.

3.3 Call Creator

This list is invoked whenever you type one of the following keywords and press [Enter] afterwards.

set [Enter]
get [Enter]
send [Enter]
move [Enter]

3.4 Using Autosuggestion Lists

After the list pops up, you can just keep typing, and the list will locate to the first matching line item, or use the mouse or arrow and PageUp/Down keys to browse the list. Once the required item is found, pressing tab will insert the item and leave the mouse on the same line, while Enter will leave you on the next line. Escape will remove the list.

3.5 Other Suggestion Lists

Under the Tools menu there is a submenu titled AutoSuggestion Lists. All the lists mentioned above are available here, as well as a Local Variables List and a Key List. The same restrictions are placed on their use here as when they appear automatically (eg - don't expect a procedure list outside an object).

4. Menus and Toolbar

4.1 File Menu

This has all the standard file options (New, Open , Save, Save As, Save All, Close, Close All, Print and Exit). Most of these can be given shortcut keys (see next section). There is also a list of recently used files, and an option called "Open Standard VDF Package". This seems to work as a standard file open, except it starts in a different working directory.

4.2 Edit Menu

Has the standard editing functions (Undo/Redo, Cut, Copy, Paste). Also has Select All, Select Line, Delete Line, and the find and replace functions (Goto Line, Find, Find Next, Replace). The final entry (Find in Files) brings up the Windows Find Dialog.

4.3 Options Menu

System Parameters lets you configure the VDF specific areas of the Hammer. File associations, related programs and Language Keywords are controlled here.
Set Working Directory sets the default starting directory for File operations.
Select Workspace set the currently active workspace. Using the correct workspace will help ensure the FileView can find the correct associated files.
Properties This allows you to configure the editor areas of the Hammer. If there is no file open (the editor is not visible) then the System Parameters dialog will show instead.

4.4 Build Menu

Has the options Run, Precompile, Execute and DebugRun. These commands are only available for files of a suitable type. You may also need to set up information about your compiler and debugger in the System parameters dialog.

4.5 Tools Menu

File Headers lets you maintain and insert standard File Headers. There are Global and User headers. The header will be inserted in the top code area of the file to keep it IDE compliant. The insert options can be set up with Shortcut Keys (ToolsInsertHeaderGlobal and ToolsInsertHeaderUser commands)
Autosuggestion Lists Allows you to bring up the various suggestion lists. See Auto-Suggestion Capabilities for more information on using these. The Shortcut Key commands for these all start with List.
Macro Allows records and playback of macros. The macros can be assigned Shortcut Keys. Macros cannot be deleted, but you can overwrite them or de-allocate the Shortcut Key.
Insert Revision Entry Brings up an edit area that you can type revision text in. This will be inserted in the revision section of the header area. If you do not have a valid revision section, an error will occur.
ASDB Compiler This runs through the base classes, updating and expanding out the autosuggest database. This should be done when ever the classes change. It is done for you during installation.
DosBox Brings up the Smart Dosbox - which starts in your appsrc directory.
VDF Class Reference Starts the Class Reference program.
Customize Items This allows you to add or change your own tools entries.

4.6 Window Menu

Has the standard windows options (Cascade, Tile, Minimize/Restore all, Split). At the bottom has the list of currently loaded files. Also has the following:
Display Options Hide/Show the CodeExplorer and Error List windows.
Error List Jump to the error list (if visible)
Code Explorer Jump to the code explorer. If already there, switch windows.
Synchronize CodeView Synchronize the location in the CodeView with the current cursor location in the Edit Window.

4.7 Help Menu

Most of the menu items here do not work at present, as the help files have not yet been created. The About box does work.

4.8 Toolbar

The toolbar has some of the most common commands on it. The Properties button at the end will bring up the Editor Properties if a file is loaded, and the System Parameters if not.

5. Editor Commands and Shortcut Keys.

5.1 OverView

The CodeMax editor comes with a large number of built in commands. Some of these come with Shortcut (or Hot) keys already established, some do not. Many of these are not available any other way. These can all be modified to your own specifications in the Properties Dialog, Keyboard Tab. Multiple keyboard assignments for the same command are accepted. It is recommended that you take a quick look through the commands listed there and see which you might use. Some commands you may wish to use are listed below

5.2 Common Commands

File Commands
FileOpenFile Opens a file
FileSaveFile (F2) Saves the file
FileSaveFileAs Save file as...
FileSaveAll Saves all opened files
FileCloseFile Closes the file
FileCloseAllFiles Closes all files
Build Commands
BuildRun Compiles and Runs the main programfile
BuildRunCompile Compiles and Runs the current file
BuildCompile Compiles the current file
BuildPrecompile PreCompiles the current file
BuildExecute Starts the main program without compiling
BuildDebugRun ReCompiles with debug info and starts the main program
BuildDebugRunCurrent ReCompiles with debug info and starts the current program
Window Commands
WindowSwitchToCodeView (Alt+F1) Activates the CodeView window
WindowSwitchToErrorView Activates the Error window
WindowSyncCodeView (Ctrl+S) Synchronizes the CodeView with cursor position
WindowNextView (Ctrl+Alt+Right) Activates the next view
WindowPreviousView (Ctrl+Alt+Left) Activates the previous view
List Commands
ListCreator (Ctrl+Left) Activates the Creator list
ListObjects (Alt+Down) Activates the Object list
ListVariables (Alt+Right) Activates the Variables list
ListKeys Activates the Keys list
ListProcedures Activates the Procedures list (Overwriting)
ListFunctions Activates the Functions list (Overwriting)
Other Commands
ToolsInsertHeaderGlobal Inserts a global header into the current file
ToolsInsertHeaderUser (Ctrl+H) Inserts a user-specific header into the current file
OpenFileUnderCursor (Ctrl+O) Tries to open the file under the current cursorposition
InsertRevisionMark (Ctrl+R) Inserts a Revisionmark
ToggleComment (Alt+A) Toggles the current line comment marks

6. Trouble Shooting.

6.1 How do I jump to an object from the CodeView?

Question: When I click on an object in the CodeView, the edit object does not relocate to that object. Shouldn't this work?
Answer: This is not working on some (all?) machines.Pressing Enter will synchronise the edit area with the object, tab will move you to the edit area. To sychronise object view with the edit area use Ctrl+S

6.2 Why doesn't the mouse work on auto-suggest lists?

Question: Doubleclicking on a autosuggestion list will not do anything. How do I select the correct item?
Answer: Use Tab or Enter. The mouse does not work here.

6.3 How do I configure the Hammer?

Question: What configuration options are available and where?
Answer: Under the options menu there are two options that allow configuration.
System Parameters will give you access to options about the editor as a whole. File associations, related programs and Language Keywords are controlled here.
Properties will give you access to the CodeMax Properties Box. This is also available from the right-click menu on the edit window. Settings that affect the edit window itself are controlled here - Color settings, Tab spacing, Shortcut keys and miscellaneous other settings.

Note that CodeMax properties are only available if the editor is visible (ie if you have a file open). Otherwise you will get the System Parameters instead.

6.4 How do I control the auto-change of Case on Keywords?

Question: What controls are available for auto-changing of case?
Answer: Words defined in the Keyword or Scope lists (Options/System Parameters and the Language Highlighting tab) are changed to use that case. If you want something different, or wish to add keywords, just modify the list. This whole case changing function can be turned off/on in the CodeMax Properties Box (Option/Properties) at the bottom of the Language/Tabs tabpage.

One known bug relating to this area in the current version is that #IF has not been defined as a Scope Keyword.

6.5 Why doesn't the CodeView tree update when I add a procedure?

Question: After I write End_Procedure the CodeView tree does not always update.
Answer: The process that updates the CodeView is only run when the linecount of the file changes. This is for performance reasons. This procedure also checks to make sure that the opening and closing scopes match up, and will only update when this is the case. So the CodeView tree will only update when the procedure is finished and then the line count changes again.

This can also lead to the CodeView tree being empty. If you save a file with an unfinished procedure in it and then re-open it, because the number of start and finishing scopes does not match up, then it does not display at all.

6.6 How do I export and import my Shortcut Key definitions?

Question: How do I export and import my Shortcut Key definitions?
Answer: These are stored in the CodeMaxEditor.Ini file in the line starting with PSHOTKEYS. Copy and paste this line to a text file to save it. Restore by copying back to the same location.

6.7 The Hammer crashes when i start it, what gives?

Question: Why does the Hammer crash while i just want to start it?
Answer: We have seen occasions on which the Hammer crashes immediately when you start it. This is mainly due to a corrupt CodeMaxEditor.Ini file. If you already had a working version of the hammer installed, you might want to copy that one over, otherwise get one from a fellow programmer. Optionally you can edit this file with Notepad and scan it for folders not available on your machine.

 


For additions, omissions and errors in this FAQ, please contact <hammer@clockworkcomputing.com.au>.

Compiled by Stephen Hope, from questions asked in the Hammer newsgroup, documents provided by Michael Kurz and elsewhere.

Answers and additional input provided by Michael Kurz and Sergey Natarov.

Thanks everyone!