[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GSOS icon recognition problem.



<cshank@freenet.edmonton.ab.ca> wrote:

> I have created an icon for the IIgs to EXECute text files with the suffix
> ".EXEC" with BASIC.SYSTEM. Unfortunately, it appears that GSOS refuses to
> recognize any icons defined for file type $04 (TEXT).

You probably have an icon ordering conflict - something else is defining
an icon which matches all your text icons, before your custom one.

Here is an extract from Apple IIgs Technical Note #108 (Finder
Funkiness, by Dave Lyons) which explains how it works in System 6.x:


ICON SEARCH ORDER

When the Finder looks for an icon it uses the first match it finds.
When more than one icon would match, the order is important.

Some icons are built right into the Finder's resource fork--those are
always searched last.  Other than that, the Finder searches in
device-number order (for example, icons on device number $0001, the boot
device, override icons on other devices).

On each disk, icons in Desktop files override icons in old-style icon
files. Among old-style icon files in the same Icons folder, each icon
file overrides subsequent (as returned by GetDirEntry)  files in the
same directory.  Within an icons file, earlier icons override later
icons.

If you create a "generic" icon that matches a broad class of files--for
example, all files of a particular file type--you have to be very
careful where you put that icon.  A generic icon in any file's rBundle
will wind up in a Desktop file, where it will override some old-style
icon files (or all of them, if the Desktop file is on the boot disk).

There's really no good place for a custom generic icon.  (Well, the
Finder's resource fork would be a good place, but we recommend not
messing with that.)

A halfway-good place is in old-style icons folders, at the end, on the
highest-numbered convenient device (for example, your third hard drive
partition of three).

Note that the 6.0 Finder's matching order for old-style icons is more or
less the reverse of what it was in previous versions.

<end extract>


If you don't have another Icon file which contains a generic text file
icon, then my guess is that you have ended up with one of these icons
(or a file type link, at the very least) in a Desktop file.

Try deleting your desktop files, quit and relaunch Finder, and see if
your icon works.

-- 
David Empson
dempson@actrix.gen.nz
Snail mail: P.O. Box 27-103, Wellington, New Zealand