setting an alias

I can never remember exactly how to do this (especially since I do it about once every five years). In the old editor I had set an alias for library files to be EITHER the current directory or the tblibs directory. I see where to set an alias in the new editor, but don't know how to set the current directory alias. Thought it was easy, but it is not clear now (to me) how to do it. Anyone know?

RWT

Comments

Sorry

Sorry

ALIASES

Hi Rick,

The old fashioned way of using aliases in curly brackets was used as follows:

LIBRARY "{library}myfile.tru"

The word library in crly brackets is the name of the alias group and refers to the library directory, e.g. \tblibs

This notation forces the editor to look in (library) first.

If you leave out the {library} then the editor looks into all alias groups as well as the current working directory - well it will do when I get that bug fixed.

Regards
Big John

Aliases

Hi Rick,

The \tblibs folder is automatically included in the aliases group. To use the alias in your program you can use {library} filename, but the new editor will also try the current working directory,\tblibs, \tbhelp and \tbdo even if you omit the alias in curly brackets.

You cannot set the current directory in the new editor. It is automatically set to the same directory as your source code.

Under the settings menu there is an option SET ALIAS which allows you to add aliases to the three default groups. Unlike the old editor which forgot the alias settings each time you shut down, the new editor remembers all aliases.

Regards
Big John

aliases

I just tested this pretty well and it DOESN'T WORK. The editor IS NOT finding a library file in the same directory as the source file. Check it out--be sure the library file is not also present in TBLIBS.

Rick (Will post this in BUGS as well)

ALIASES

Hi Rick,

Personally I never use aliases and I always use full pathnames, or I make sure I have specifically set the current directory, but that is just the way I work. When I wrote the editor I found that the way TB deals with aliases varies depending on the version - curly brackets or not.

Currently, the editor sets the working directory to be the same as the current source file. Prior to running or compiling, the source code is parsed for occurennces of curly brackets or the keyword LIBRARY or the keyword OPEN. In the case of curly brackets the editor locates the alias group and substitutes the full pathname. In the case of LIBRARY or OPEN the editor looks for literal strings not variablenames, AND the absence of slash signs or other directory specifications, and then checks to see if the file exists in tblibs, tbhelp and tbdo in that order. If it finds the file then it substitutes the full pathname. If it doesn't find the file, then it just moves on, assuming that the file must be in the current working directory. If it isn't there either, then the compiler will raise an error saying "no such file". In other words the editor leaves the source code unchanged if it cannot find the file in the aliases list. It also leaves the source unchanged if the filename is preceded by any directory designation. In other words aliases are only processed if the filename is a string literal and the group is in curly brackets OR if the filename is alone with no directory specs.

That is how the editor should work. I will take your tip to check again to see that it does work that way.

Regards
Big John

curly brackets?

Not sure if I fully understand your reference to curly brackets here. I know they are used in the ALIAS menu, but what about a LIBRARY statement. I am used to using

LIBRARY filename.tru

with filename.tru in the same directory as the source file. That is what doesn't seem to work EXCEPT MAYBE this is part of the editor window losing the source file directory that I point out in 6.x BUGS.

Rick