[comp.sys.mac.misc] Finder loses ICN#s

khaw@parcplace.com (Mike Khaw) (01/16/91)

In System 6.0.5/6.0.7, why is it that sometimes when you copy a file
from a floppy to your hard disk, you end up with a "blank page" icon
(generic document icon?) for the resulting copy?

This happens regardless of whether I'm running MultiFinder or (uni)Finder,
and regardless of the CDEVs/INITs I do/don't have installed. It happens
to both an internal Quantum Pro 40 that came with the Mac and an external
DPI 44R Syquest drive.

Looking at the hard disk's Desktop file with ResEdit shows that its
ICN# resource doesn't contain the ICN# that should match the copied file,
but even adding that missing ICN# to the Desktop file doesn't fix things
(of course, I'm not enough of a Mac hacker to know what, if any,
significance the ICN# ID number has).
--
Mike Khaw
ParcPlace Systems, Inc., 1550 Plymouth St., Mountain View, CA 94043
Domain=khaw@parcplace.com, UUCP=...!{uunet,sun,decwrl}!parcplace!khaw

resnick@cogsci.uiuc.edu (Pete Resnick) (01/17/91)

khaw@parcplace.com (Mike Khaw) writes:

>In System 6.0.5/6.0.7, why is it that sometimes when you copy a file
>from a floppy to your hard disk, you end up with a "blank page" icon
>(generic document icon?) for the resulting copy?

Icons for files are kept track of in BNDL and FREF resources, which
contain which ICN# goes with which file type. Most programs only keep
the BNDL and FREF resources in the Application file itself and don't
copy them into the data files (which is the right thing to do). If there
is no file on the disk which contains the BNDL, FREF, and ICN# for a given
file type (like if you put a Microsoft Word file on your disk without
Microsoft Word itself on your disk), the icon will be the standard, blank,
"I don't know what this is" icon.

It's a little more involved than that, but simply, that's what's going
on.

pr
--
Pete Resnick             (...so what is a mojo, and why would one be rising?)
Graduate assistant - Philosophy Department, Gregory Hall, UIUC
System manager - Cognitive Science Group, Beckman Institute, UIUC
Internet/ARPAnet/EDUnet  : resnick@cogsci.uiuc.edu
BITNET (if no other way) : FREE0285@UIUCVMD

francis@uchicago.edu (Francis Stracke) (01/17/91)

In article <1991Jan16.194741.27709@ux1.cso.uiuc.edu> resnick@cogsci.uiuc.edu (Pete Resnick) writes:

   khaw@parcplace.com (Mike Khaw) writes:

   >In System 6.0.5/6.0.7, why is it that sometimes when you copy a file
   >from a floppy to your hard disk, you end up with a "blank page" icon
   >(generic document icon?) for the resulting copy?

   Icons for files are kept track of in BNDL and FREF resources, which
   contain which ICN# goes with which file type. Most programs only keep
   the BNDL and FREF resources in the Application file itself and don't
   copy them into the data files (which is the right thing to do). If there
   is no file on the disk which contains the BNDL, FREF, and ICN# for a given
   file type (like if you put a Microsoft Word file on your disk without
   Microsoft Word itself on your disk), the icon will be the standard, blank,
   "I don't know what this is" icon.

   It's a little more involved than that, but simply, that's what's going
   on.

What you should have pointed out is that simply copying over the BNDL/
FREF/ICN# combination may not be enough--the Finder renumbers.
Simplest way to cure this is to copy the app to the disk, then delete
it (unless you still want it around, of course :-).


--
==============================================================================
| Francis Stracke		| My opinions are my own.  I don't steal them.|
| Department of Mathematics	|=============================================|
| University of Chicago		| Until you stalk and overrun,	     	      |
| francis@zaphod.uchicago.edu	|  you can't devour anyone. -- Hobbes 	      |
==============================================================================

khaw@parcplace.com (Mike Khaw) (01/18/91)

In <khaw.664002978@parcplace> I said:

>In System 6.0.5/6.0.7, why is it that sometimes when you copy a file
>from a floppy to your hard disk, you end up with a "blank page" icon
>(generic document icon?) for the resulting copy?

[what I tried, my config., etc., omitted].

Stanton Loh at Cornell had the answer: the copy of the file that was on
the floppy didn't have its bundle bit set. If the bundle bit is set
*BEFORE* it's copied to the hard disk, then the copy gets the correct
icon.

I'd already tried: rebuilding the desktop, making sure that the
application that the file belonged to was already on the hard disk,
setting the bundle bit on the COPIED file on the hard disk, copying the
ICN# for the file into the hard disk's invisible desktop file. None of
those had any effect.
--
Mike Khaw
ParcPlace Systems, Inc., 1550 Plymouth St., Mountain View, CA 94043
Domain=khaw@parcplace.com, UUCP=...!{uunet,sun,decwrl}!parcplace!khaw