TITLE
    Generic Icons: Applications on Removable Media (4/94)
Article ID:
Created:
Modified:
15200
4/22/94
04/22/94

TOPIC


    I have documents on a boot volume and their applications on another
    volume. Sometimes my documents have generic icons and some times they are
    normal. Why?


DISCUSSION


    The Finder uses a file called the Desktop Database on each volume to keep
    track of icons and other important file information. The Desktop Database on a given volume is only updated when a file with a "bundle resource" is copied to that volume. Bundle resources are found in applications, control panels, extensions or files with custom icons. An Adobe postscript font is an example of a file with a bundle resource (also called bundle bit) that isn't an application, control panel or extension.

    Documents and other files associated with a specific application (help files, dictionaries, etc.) do not have this bundle resource and depend on the application to provide this information to the Desktop Database and in turn the Finder.

    We don't have all files use their own bundle resource because it's more efficient in regards to space and copying time to limit the files with bundle resources.

    If you have a folder with 100 files with the same custom icon, each will have an entry in the Desktop Database. This is very inefficient.  Adobe postscript font files do this for example. Even though they all use the same icon, each one updates the desktop database when copied and has its own unique entry in the desktop database. The desktop database views them

    all separately and has 100 entries. By referencing the application, we can
    have one entry to these same 100 files or 10,000 files, which is much more  efficient.

    There are some caveats when working with multiple volumes and/or servers. If an application is on a volume that is not available at startup (CD,
    Syquest, File Server), then document icons on the volumes will appear as generic document icons. If you mount a volume with the application after booting the CPU, the document icons may or may not be generic depending on the sequence of events initiated by the user. Here are some examples:

    * If you attempt to 'view' a document icon on a start up drive that does
    not contain the application first, and get the generic icon (have it's
    window left open or intentionally open it's window), all files of the
    same 'type' will be generic on any volume until you restart.
    * If you do not 'view' the document icon, mount the volume with the
    application, and then attempt to view the document on the boot volume,

    their icons will appear normal.
    * You can get an inconsistency if you 'view' the document icon but not
    another file associated with the application (like a dictionary). In
    this case all occurrences of the document icon will be generic, but the
    dictionary icons will be normal because they are different file types
    with different icons.
    * Additionally, you can change views to small icon and you will see the
    correct small icon for the document while the normal size icon is
    generic.

    This starts over again when you restart the CPU.

    Suggested work arounds:
    1) Have the volume with the application mount on the desktop when the CPU
    is turned on or restarted.
    2) Do not "view" the document icons until the volume with the application
    is mounted.
    3) Copy the application to the volume with the documents. This updates the
    desktop database, then you can delete the application. The proper
    document icons will be displayed for that application until the desktop
    file is rebuilt. If the desktop is rebuilt, the above situation returns

    since the application with its bundle resource is not there to add the
    information to the desktop database.

    For additional details on bundle resources and the desktop database, refer to the Inside Macintosh series of books and page 118 of "Technical Introduction to the Macintosh Family" second edition. See also the article "Generic (Document or Application) Icons: Restoring Proper Icons."

    Support Information Services


Document Information
Product Area: Mac OS System Software
Category: General OS
Sub Category: General Topics

Copyright © 2000 Apple Computer, Inc. All rights reserved.