Nicholas Riley
Computer Science 323
4 May 2000


FileBrowser

Components:

Implementation:

The file browser is written in C++ for the Macintosh, using the experimental Guide cross-platform application framework by Chris Bergmann, and its associated GDB object database. The Locale support requires Mac OS 8.6 or later; the program will simply fail to run due to dynamic linking errors with LocaleLib, otherwise. If you don't have a Mac handy and are at UIUC, this should run fine on the CCSO sites' iMacs. As I mention below, installing MacsBug may help since I've left some debugging breaks in. To compile, you need CodeWarrior Pro 5 or later to read the project file (5.3 recommended), Apple's Univrsal Headers 3.3.1, and BkgConsole unless you want to comment out all the lines that begin ECHO or ECHOINDENT, and remove the #include "Root.h" statements. A full rebuild will be necessary, since I removed object code and compacted prior to posting the StuffIt archive to keep the download size small.

How to use it:

Just double-click the FileBrowser icon. Choose a language from the first dialog - currently supported languages are Swedish, Italian, French, German, Spanish and English. Attempting to choose any other language will result in an error message. You'll see a Finder-like window that contains the contents of the startup disk. No fancy icons, just files and folders.

The program is mainly well-behaved. It may crash on quit once in a while. Also, if you don't have MacsBug installed, then the DebugStrs will crash you. If you have a lot of items on your startup disk, it may run out of memory while allocating the database structure, which will trigger one of the aforementioned debugger breaks. All memory is allocated from the application heap, so do the normal thing of increasing memory in Get Info.

Stuff to try:

Open some windows. Note that certain windows may appear empty at first, even though the underlying disk contains data for those folders. The database is essentially doing a breadth-first search of the hard disk, in a separate thread. Wait a while, and if the app doesn't run out of memory first, the window will be filled in. You can move icons around, open folders, and note that the icon positions are saved. New icons, as they are inserted into the database, will attempt to position themselves so they don't overlap, but this routine isn't always altogether successful.

Selection, opening and closing have similar visual feedback to the Finder, though without the cool zoom rectangles. The system can sometimes lose track of formerly open folders being closed if the parent window is closed and reopened, causing the icons not to update immediately; since this was not the primary goal of the project I didn't worry too much.

The localization of folder names I do is visible in the System folder. I only read the "fld#" resource from a number of localized Mac OS 9 distributions, not the more complete "nfd#" resource, because the latter is undocumented. Given more time, this would be easy to add.

Movement of files (this is only accomplished in the database, not physically on disk, as described in the proposal) occurs via a Windows Explorer-like cut/paste method. Highlight an icon, choose Cut. Click in another window, choose Paste. This moves only in the database, not in the physical filesystem.

Files:

Since there are a lot of files in the Guide framework that are intermixed with mine, here's a list of files that are part of the project (i.e., which I wrote, or substantially modified, for the purpose of using in this project):

Screenshots:

The language selection dialog box.
The language selection dialog box. English doesn't do anything on English-lanuage systems, but if you were, for example, to run this on an Italian Mac OS, it would convert the Italian folder names into English.

The French localization.
After choosing French from the language menu, a portion of the System folder (rearranged to put a few localized names together).

The Swedish localization.
After choosing Swedish from the language menu. This also shows a couple of the icon effects - a disabled icon indicates one that has been cut to the clipboard; an icon filled with a pattern indicates an open folder (just as in the Finder).

The Spanish localization.
After choosing Spanish from the language menu, cutting the Application Support folder (Soporte para las aplicaciones) from the System Folder, and pasting it in the folder containing this project. This does not move the file in the disk directory, only in the database.

Thanks