Editor pages lose directory

This, in my mind is a really serious bug. I'm getting somewhat upset at having spent $200 to upgrade here.


Open a program in the Editor. Run the program which accesses files in a folder that resides in the same folder as the program file. For example

testprog.tru in folder TESTPROGRAMS (TESTPROGRAMS/testprog.tru)
load a graphics file from TESTPROGRAMS/graphics/picture.jpg

Works fine.

Now I open a second editor window with

tesprog2.tru from folder NEWTESTS (NEWTESTS/testprog2.tru)

again I open a graphics file from


Again, works fine.

NOW.....go back to the first editor page.

Run testprog.tru again. Now it can't find the graphics file. Do an ask Directory and you are still back in the second directory.

IN OTHER WORDS--the current directory needs to update to that from which the source file in the editor window was loaded. Instead it seems to be the last directory from which something was loaded. Doesn't even seem to update with a save or save as. In fact I can close the second editor window and file and the remaining window still won't update the editor such that it knows the directory correctly--although it does know for saving, just not for running the program.

This really is bad for working on multiple programs--which I do all the time (often have 3-4 program files open and from different directories.

I really had hoped this was all working by now (having had personal issues that took me away from testing the editor). ;-(




Hi Rick,

Such a foolish error.

The editor writes an extra line of code into the copy of all programs before running the copy. This line of code is:

This is to make sure the running program actually knows what the current working directory is, because although the editor knows, the program is actually being run by TBsystem (which doesn't know).

My foolish mistake was that the string workdir$ is a local variable known only to the editor. The actual code above is written inside a library module which didn't know what workdir$ was. All I had to do was declare workdir$ as PUBLIC and the problem was solved.

I am about to check that this has cleared up your other issues. This might also account for the problem with FIND. It too is generated by a library that doesn't know what the working directory is.

Big John

Working directory

Hi Rick,

Yes very serious.

I will check out why the working directory is not being updated. The editor knows what it is because it saves correctly.

Big John

Maybe a source of my ALIAS problem

As commented in another thread, this losing the source file directory MAY be the cause of the Alias problem I've been having--but then again maybe not. While not at my workstation, I usually have the particular library file that the editor can't find in all the source directories--so not finding a library file in the source directory may still be a problem even if the editor source directory problem can be fixed.

And yes, as noted, the editor window knows the right directory to SAVE into, but as you say--doesn't update the editor that this is now the WORKING directory if you move between editor windows with source files from different direcories. I'm thinking that fixing this may fix a lot of the problems I'm having--then back to FIND. ;-)



Hi Rick,

I like the logic.

I am up to my neck in work right now, but at the first free moment I will fix this problem as a priority.

We now have a system of updating versions by posting a download, so theoretically bug fixes can be passed on ASAP.

Many thanks for your dilligent detective work.

Big John