Saturday, July 4, 2009

Project Paths

I just might be winning my war on depression. For 6 weekends in a row, including this one, I've been depression-free, and had a total of only 1.5 days of depression in the intervening weekdays. I got up early this morning and read the newspaper. I just had lunch (2 frozen waffles and orange juice). Before lunch I designed the high-level user interface (menu commands) of a new TileGamer feature. I designed that feature 2 days ago, enabling users to more easily handle multi-file projects stored at more than one location, such as at home and at the office. The menu commands I designed today all belong on the Project menu:
  1. Load Trans
  2. Save Trans
  3. Load Paths
  4. Save Paths
  5. Close Paths
  6. Configure
Command 2 takes the current project file, a text file with a path and file name on each line, and converts each path (if possible) into an alias followed by an optional relative path. The project file has a .TG extension, and the converted project file has a .TGX extension. All the aliases are by default stored in the global.pth file, and each alias includes an alias name enclosed in angle brackets followed by a path. Command 1 does the same conversion in the opposite direction. The user can create more than one path file, all having a .PTH extension.

Command 3 loads a path file into the main file buffer (where the Treescript files are displayed, those files being the source code files of the current game or TileGamer project). Command 4 saves the path file to disk. If TileGamer detects that there is no global.pth file, Command 3 will prompt the user to create that file if desired. Command 5 clears the main file buffer, exits Path Mode, and restores the main file buffer to its previous contents.

Command 6 enables the user to edit the project configuration file, which has the same file name as the project file but with a .CFG extension. This file includes 3 pieces of information: the path of the project (.TG) file, an optional home directory (a path), and an optional path and file name of the path file containing all the associated aliases (usually global.pth).

When Path Mode is enabled, the main file buffer contains the contents of the current path file (usually global.pth). The only keyboard commands that work in this mode are Up Arrow, Down Arrow, and Enter (as well as accelerators or shortcuts of edit commands such as cut, copy, paste, and delete). Pressing Enter, or clicking on the Pth button, brings up a dialog box enabling the user to modify the alias name and path of the current line in the current path file.


I might begin implementing all of this this afternoon. Also this afternoon I intend to get a haircut. Maybe I'll have Kraft Dinner for dinner. In half an hour I'm going to have a 3rd cup of coffee. Bye-bye weekend depression. Hello, productivity.

No comments:

Post a Comment