Release Notes for True BASIC 5.605 Beta for Windows

There are severe limitations on what can be done with TrueBASIC editor because many of the functions are contained in the interpreter. As a result there are some unsatisfactory aspects of the overall TrueBASIC system that still remain despite the improvements in the new editor. The aim of this release is to address those issues that we can until more permanent fixes can be incorporated directly into the interpreter.

The current editor (version 5.5b19) is an amalgam of legacy code and a succession of add-on patches. The new editor is based on the current editor uses a non-XVT version, i.e. it addresses Windows APIs directly and does not use the XVT interface. The initial release of the new editor is specifically designed for MS Windows operating system only, although we plan to increase compatibility with other operating systems in the future. The advantage in using this basis is that there is no need for distributable DLL files to accompany bound executable programs, and the file size of executable programs is significantly reduced.

There is a significant quantity of redundant code in the current editor, which is being cleaned up in this beta version. The current editor also uses routines from a very old version of the library module TrueCtrl.trc which still contains bugs that have long since been cured in later releases of this library. Chasing and rectifying bugs in the current editor is therefore difficult and time-consuming.

It has been an unfortunate fact that past releases of TrueBASIC have introduced new bugs with successive releases, even as they fixed other ones. To overcome several of these problems, the new editor uses the CTX library to generate dialog push buttons. The same is also true of the ListBtn object which sometimes responds incorrectly to mouse clicks.

The new editor uses an up-to-date version of TrueCtrl.trc in which the TXED control has been enhanced and improved. This is important because a very large portion of the new editor relies heavily on the TXED control. In particular, extra margins have been added to the left and right of the text area making it easier to position the cursor on the first character. The overall appearance is improved by these extra margins that give the new editor a conventional book look.

The old editor was limited to black on white text. A restful range of pastel colors is available in the new editor as background colors. Similarly, any color can be used for the text.

The current editor "settings" are unnecessarily complicated. In the new editor the settings or preferences have been simplified to the choice of fonts and colors. Other settings have been reduced to simple on-off switches that remain active until reset. The "hotstart" switch makes the last file you were working on the active file when you re-start. All other open files when you EXIT will be re-opened when you re-start and their locations on screen are preserved. You can also switch on automatic back-up copies when you save files. An automatic "file save" feature can be switched on when you EXIT.

The normal working environment looks very similar, but there are two new windowing features - TILE allows you to display several open files simultaneously, making copying and pasting from one file to another much easier, and CASCADE allows you to stack multiple windows in a corner of the screen so that you can work on one file in the rest of the screen.

When saving files, the original DOS version allowed users to specify the name only, and TrueBASIC added the extension "TRU" automatically. This was dropped in the Windows versions, but has now been restored. The general rule is that if you give a filename without an extension in a dialog box, then the extension "TRU" will be added. If the filename you specify already has an extension then that extension will be preserved.

The command window has long been redundant, although some users still find the command line useful. As a result the new editor features a command line in every open window so you don't need a separate command window. Unfortunately, the interpreter generates the command window whether we want it or not, so the new editor hides this by default. The only time the command window is made visible is when you RUN a program, because the command window menu allows you to STOP a running program. The new editor has boxes that show the current line and character positions and an information box that displays messages. If you click on the information box it becomes the command line where you can type commands.

If any errors occur during COMPILE or RUN, then these were previously displayed in the error window. Clicking on any line in the error list sent the cursor to the offending line in the program code. At full screen window size it is often difficult to establish where the cursor is currently located. In the new editor the error list is set out more clearly and a mouse click on the list highlights the offending line of program code so that it is instantly recognizable.

Break points in earlier versions of the editor where shown as arrows in the black left hand margin alongside the text area. The new editor has a simpler and more convenient method by showing break points as comments in the actual code itself, e.g. !<. This means you can save files that include break points and continue working on them at a later date. These breakpoints can be added or removed by just clicking the mouse in the left hand margin.

Earlier versions of the editor contained a bug in the hard copy listing routine that truncated long lines of code. This problem should have been resolved in the current editor but some users still report printing problems. For this reason the new editor offers two printing methods; a high definition virtual window method, and the conventional OPEN#n: PRINTER method. PRINT under the FILE menu uses the high definition method. LISTING under the FILE menu offers the conventional printing method. The new editor allows the user to specify how many characters should be printed on a line. Lines longer than this will be wrapped on the hard copy printout. The number of lines per page can also be specified. This can done under the SETTINGS menu by selecting PREFERENCES.

In addition the new editor also offers a WRAP feature under the EDIT menu which allows the user to convert any window to wrapped mode in order to read text files by wrapping long lines to fit the text area. By clicking on the WRAP option again restores the normal programming mode. In wrapped mode text cannot be RUN or COMPILED, instead you must restore the programming mode.

The TrueBASIC help file has been the subject of some criticism in the past. The new editor adopts a radical approach to making the help file more flexible and more useful. It is very common to use library modules when writing programs. Invariably the user is not always familiar with the parameters and syntax of the routines within the library module. For this reason the new help system is arranged to be able to handle individual help files for each library module. The new editor incorporates seven such help files, with capacity to add many more. It is intended that this feature should encourage the production of appropriate help files for all future library modules.

In order that help files should become more helpful, the new editor incorporates a feature that allows the user to edit, modify or add new items to any help file. The intent here is to encourage users to improve the topic notes to make them easier to understand, and to share these annotations with other users through the TrueBASIC Forum.

The new editor also allows users to CHAIN (and return) to Windows applications such as Word or Excel, and to CHAIN (and return) to any other executable program. There is also a built-in chain connection to a utility program called TBF. This program features a drag and drop process for creating windows and objects within windows, which at the same time generates the program code to reproduce these "FORMS". The program skeleton and program code automatically generated by this application can be run without the user writing any code at all. Beta testers are free to explore this feature but the main purpose is to test out the new editor.

Beta testers are asked to comment on their overall impression of the new editor via the bug report forum, and to list and comment on features that don't work properly or don't work as the reviewer would like it to work. If any bugs are found, it would be helpful for the tester to describe the circumstances that revealed the bug. It would also help if the tester reported the operating system that the new editor was tested on. If the bug involves an external device such as a printer, then we need to know the make and model of the printer. It would also be helpful if testers identify any features they think ought to be present and which are currently not yet available in the new editor.

Version 5.604 contains the following revisions:
(1) The FIND window and the PREFERENCES window had a bug in version 5.603 that prevented these windows from working correctly. This has now been cured.
(2) Switching between windows has been improved so that the focus remains where the user has last clicked.
(3) The TrueBASIC logo in the ABOUT window has been restored.
(4) The DLL files for existing TrueBASIC executables created under previous versions have been included in the package. This will allow programs such as FORMS to be run properly.
(5) When a program file is compiled you will be given the option to save it. Your original TRU will now remain intact for further development, unlike previous editors which erased the source file.
(6) A tutorial program for using the TrueCTRL library has been added to the HELP menu.

John Arscott
27 October 2008

Version 5.605 contains the following revisions:
(1) Although all previous versions allowed the user to open up to 10 source windows simultaneously, it appears that when any window is closed, it prevents further windows from being opened. This bug has now been resolved.
(2) Under certain circumstances, in particular when the SGLIB library is used, the logical windows used by the new editor become offset and as a result some of the labels such as LINE and CHAR are misaligned. This has been resolved by a SET WINDOW statement when control returns to the editor after a program is RUN.
(3) If multiple windows are in use and one of them is closed, then one of the remaining windows gets renamed incorrectly if SAVE-ON-CLOSE is in operation. This bug has now been cured.
(4) When any global settings are toggled, e.g. SAVE-ON-CLOSE or CONFIRM-QUIT, then only the current window menu acquires a tick mark. This bug has now been cured so that all window menus have ticks against the same setting toggles.

John Arscott
09 November 2008
True BASIC