Icon Assignment For GeoWorks Files.
Rob D Mind

I have read the ICONEDIT.TXT file written by Cami Lee, and came to a few
conclusions sometime thereafter.  Below is that same file, unedited,
followed by an unfortunate scenario and some warnings.

----------------------------------------------------------------------
Icon Assignment For GeoWorks Files.
Cami Lee

(c) Lee W. Grant Copyright 1992  

On a whim, I wanted to use the New Icons that were
uploaded by Jim Kirkpatrick and Jay Degn. I wanted to 
use, in particular, the "DCAD" Icon for some of the work
that I had been doing in GeoWorks.

I was using a scrapbook to hold some of the work I had created,
and to keep from confusing myself, I wanted that Icon for those
specific files.

After a number of attempts to change my Geos.INI file (not recommended
by GeoWorks by the way. ;), to allow for the assignment of the Icon to
the files I had in mind. I discovered that the Ini. file does not recognize
icon assignments to Geos' .000 files.

Somewhere in the back of my mind, I seemed to recall something about 
using a hex editor to change the numbers or something for Fonts, so that
they would load properly.

Using my PcTools 7.1 PcShell, I opened the file and "looked around".

I made two discoveries this day.

1.) Changing the numbers of the file icon assignment alone, would bring up
the Geos "Background" style Icon when Geos was restarted.

2.) By changing the Hex number "right next" to the name (in hex) would bring
up the desired Icon.

In either case, a different Icon then the one originally assigned to the file
would show up, AND the file would work as normally. (Thank Goodness) ;)

Anyways, unless you are familiar with a hex editor, (Which I'm not particularly,
but I've been known to mess with what I don't know;) you really shouldn't try
this.

When the hex editor pops up (At least in PcTools it did this.) you will have the
hex numbers on the left, and the "perceived" symbols on the right.  In my case,
the "text" that I was looking for, was on the right as "scbk" and on the left as 
0016(0010) 01 00 00 00 73 63 62 6B 00 00 53 63 72 70 00 00   

The hex numbers representing the "scbk" are "73 63 62 6B".  When I originally changed
the four sets of hex numbers to the equivalent of "DCAD" for the Blue colored Blueprint
Icon, and then restarted GeoWorks, the "Background" type of file Icon came up. 
The scrapbook would work, but it didn't have the Icon that I wanted. So, it dawned on me
that the new Icons are supposed to be written like so.  *.EXE= "DCAD",255. Well, I figured 
that the "255" is what was missing.  On sheer luck, I went back into the hex editor, and put
the hex equivalent of 255 right next to the "DCAD" hex numbers, and when I returned to
Geos, the proper Icon was indeed, now representing the Scrapbook file that I had saved.

The hex line now looked like so:
0016(0010) 01 00 00 00 44 43 41 44 FF 00 53 63 72 70 00 00   
The equals were as such, and remember to use the hex equivalents for Capital letters:
D=44, C=43, A=41, D=44, FF=255.

With this example, I think even the most novice of programmers (like myself) should 
have no trouble at all, assigning Icons to "Specific" GEOS files, as I have done.  It's a bit awkward
but until something is "built" to automate this for us, It's the best that I can do. ;)

Your's In Geos,
Cami Lee
----------------------------------------------------------------------

Now the idea is good & simple; it does work in theory.  However, some
adverse effects can arise, as I feel any of the GeoWorks programmers
would attest to.  Following is a sample scenario:

Suppose a GW user changed the token name of a GeoWrite file to get a
different icon to appear as described above (for the example we'll use
"LETR") and was successful.  Now let say that something unfortunate
happens ('user's kid deleted accidentally') to the TOKEN.DB file located
in the SYSTEM directory.  No problem yet, because PC/GEOS will rebuild
the file when the program starts up.  However, you now see the old
GeoWrite document icon on the file you editted.  Yet, when you examine
the file with the hex editor, it still has "LETR" instead of "WDAT".  The
more experienced user's next thought is to pull up the LETR Icon Maker
file; however, it too shows up as the GeoWrite file icon.

Why did this happen?!?  Let's go back to some history on the setup of
PC/GEOS files.  The files themselves contain the icon and the token name
that represents it.  When the TOKEN.DB file has to rebuild, or sees a new
token name, PC/GEOS appends the token name and the icon contained in
the file to the TOKEN.DB file the FIRST time it comes across it.  After that,
any icon with the same token name and id will appear as the icon listed
in the TOKEN.DB file.

So, when the TOKEN.DB file started to rebuild, it came across the GeoWrite
document that was editted to the "LETR" token name BEFORE it saw the
LETR application, and appended the wrong icon.

How can this be averted?  You could keep your icons in a directory inside
the GeoWorks directory and keep any editted files (as described above)
on floppies, although this probably isn't a 100% solution to the problem.

To the experienced users:  'Use at own risk.'
To all users:  'Beware!'
