Programmer's FAQs


Table of contents


How to compile macros

If you change a *.tip macro you have to go through several steps to receive the tcl.exe file.

A. Edit and save the *.tip file
B. Call makeit.exe ( it is normally located in the directory C:/develop/makeit/release ). Makeit.exe converts *.tip files into *.cpp files.
C. Select EMMENU macros radio button (1) makeit.exe
D. Click button Makeit (2)
E. Click button View log (3). After that click notepad should open with a log file of the Tip-to-C++ conversion. If there are any errors start again with step A , i.e. edit the tip file, correct the error, save the file, ....
F. Within the Microsoft Visual C++ ® compiler (version 6.0 required ) ensure that the current project is TCL.
G. Press the F7 function key to start the build process. If the compiler shows a list with non-existing or out-of-date file and asks whether to rebuild them, click Yes and the compiler starts.
H. Depensing on the installation you may have or not have VCtrl popping up after the compilation. Click on Cancel.
I. Start TCL.

How to add new variables

After changing the code you have to rebuild the macros ( see How to compile macros )
Check the Log file. Due to the fact that the T2C-compilation depends on the succession of the compiled files you might have to compile it twice if you add global variables. That is no bug ! That is also no feature. It just is as it is.


How to insert new macro(s)

  1. Create or copy an existing macro, modify it and save it into the directory c:\develop\tcl\EMMENU\TIP .
  2. Open the file files.lst in the same directory
  3. In this file enter the name of your macro. Don't type in the suffix .tip. It is strongly recommended that the filenames in files.lst are in ascending alphabetical order.
  4. Start the MAKEIT program.
  5. Click on "Create T2C makefile" (it is very fast)
  6. Compile the file(s)
    makeit.exe
  7. Select the Compiler's Insert file into project dialog.
  8. In the file dialog change to the directory C:\develop\TCL\EMMENU\SRC and look for your new file(s). If e.g. your macro had the name abc_def.tip, then the corresponding C source will have the name cc_abc_def.cpp.
  9. Recompile TCL

How to recompile a destroyed T2C variables database

Hmmmm, well, T2C is very sensitive if you add a new declare command in a macro and there is (after the new decl command) a syntax error in this file. T2C has then updated some, but not all of the necessary files ... This is a known factum, but at moment there is no intension to change T2C. Here is the strategy to repair the variables database.

  1. Remove the error T2C reported.
  2. Open the Explorer and change into C:\DEVELOP\TCL\EMMENU\TIP. Remove file cc_hash.tab .
  3. In the Explorer change into C:\DEVELOP\TCL\EMMENU\SRC and delete the 3 files
  4. Start MAKEIT.
  5. Rebuild the EMMENU macros and check the log file. As long as there are errors in the log file, click again on the MAKEIT button. Due to the fact that the T2C-compilation depends on the succession of the compiled files you might have to compile it several times until all the files containing DECL commands are compiled without errors before the compilation of the files that use those variables can be compiled without errors. (whow, what a grammatic guru )

Registry

The registry keeps lot of data for TCL/EMMENU. But TCL/EMMENU is programmed in such a way that you can remove all the keys and their values without damage. In that case default values are used and new keys are created. With the exception of the dongle license code ( HKEY_LOCAL_MACHINE/software/TVIPS/EMMENU (LCD)all the registry data is located in

The most important subkey is GENERAL ( here an example ):

Here you will find the keys with almost self explaining names. Keys starting with NMD mean non-modal-dialogs for the different screen resolutions. In the above example NMD_CMD_800_600 means that the command dialog for the screen resolution 800*600 has its upper left corner at (82/319), width=374 and height=143.


Each user has his own subkey ( here 'Peter') storing the information. Here an example:

CWD Current working directory ( where to search for the macros )
DATA_DIR no more used
DISP_FFT_X/Y Position of the online-fft image on the display (upper left corner )
DISP_OFF_X/Y Offset of the 1280x1024 TCL data screen. Must be 0/0 if the ScrollView is used !!
DISP_ZOOM_X/Y Position of the online-zoom image on the display (upper left corner )
EM_HOME VERY IMPORTANT: With this key all the necessary subdirectories ( like HTML, EMMENU, EXECUTE, ... )are found.
PCTF_xxx Storage of the settings used in the PCTF box
SELECTED_MACRO_x Storage of the last 6 selected user macros
SHOW_EMQUIT_WARNING 0: No warning if user wishes to quit EMMENU, 1: Warning
SHOW_QUIT_WARNING 0: No warning if user wishes to quit TCL, 1: Warning


PRINTER is a key that holds all the info users can modify in the Printer page setup dialog:



ASPECT Flag: 1: Keep X/Y ratio, 0: don't
BORDER Border width in mm
CENTER Flag: 1: Center image on page, 0: don't
FULL Flag: 1: Use full page (without border ), 0: don't
HEIGHT Height of printed image in mm
TOP Distance from image to paper's top edge
UNIT Last displayed unit in dialog (0:mm, 1:cm, 2:inch 3:TWIPS)
WIDTH Width of printed image in mm
LEFT Dispance from image to paper's left edge


In the SESSION you will find many entries that are responsible that the user will find the dialog box in the state he left it. Quite self explaining keys


Note that the number of keys will expand with further versions.


Guru's eyes

You think that it might be helpful to have the TCL code guru's eyes on your code ? Well, here they are: