Save a BNDL 1.3 © 1992 - Michael S. Engber - All Rights Reserved

Save a BNDL gets the Finder to recognize changes in a file's BNDL resource without requiring rebuilding the DeskTop or rebooting. It only runs under System 7.0 and later.

NOTE: Save a BNDL offers the option to restart the finder. This shouldn't interfere with any other currently running applications, but will interfere with other users currently accessing your Mac via File Sharing. In any event, make sure to save any work in progress before restarting the Finder.

Save a BNDL is freeware. Share it freely. Please include this documentation if you redistribute it.  Send comments & bugs to:

Michael S. Engber
 1585 Ridge Ave
 Evanston,  IL  60201
¥InterNet:  engber@ils.nwu.edu
¥from CompuServe:  >INTERNET:engber@ils.nwu.edu
¥from AppleLink:  engber@ils.nwu.edu@INTERNET#


How?

From the Finder, just drag & drop a doc or group of docs onto Save a BNDL's icon. Their BNDL information is updated and you're given the option to restart the Finder. The new BNDL info won't be visible until you restart the Finder or reboot the machine.


Why?

A file's BNDL resource controls what icon the Finder uses for the file and what other kinds of files can be dragged & dropped onto it. The Finder keeps a copy of this information in the DeskTop database, so if a file's BNDL changes, the copy will be out of date.

One way to update the Finder is to reboot with the cmd & option keys down, rebuilding the entire DeskTop. This can be very slow, especially for large hard drives. In addition, rebuilding the DeskTop doesn't always produce the desired results. If there are multiple copies of a file around - one of their BNDLs will be used, possibly not the one you want.

The Finder only reads the database when it starts up, so Save a BNDL gives you the option to restart the Finder, allowing you to see the changes immediately.

Save a BNDL is primarily of interest to programmers, but it is also useful whenever you get a file whose BNDL information is out of date. For example, this happens if you replace an existing version of a program with a newer version that has a different icon or that handles new file types.


Why Not?

Restarting the Finder may or may not be a bad thing. Personally, I find restarting the Finder much faster than rebooting + I don't have reload all the apps and documents that are currently open. Under some circumstances, restarting the Finder may cause problems. So far, the only reported problem is with the DiskDoubler init, but I'm sure there will be others. To the best of my knowledge, problems created by restarting the Finder can be fixed by rebooting.


More Detail?

¥ Save a BNDL forces an update to the DeskTop database by removing all the current BNDL information for a file's creator, it then clears the hasBeenInited bit of the file so that the next time the Finder sees the file it will reinstall its BNDL info in the DeskTop database.
BNDL information is removed from the DeskTop databases of all currently mounted volumes.

¥ Save a BNDL is similar to the programs BNDL Banger and BNDL Banger Pro, written by Tim Swihart. The main difference is that Save a BNDL provides the restart finder option. Much thanks to Tim for leading me around all the pitfalls he found (I wrote this before I looked at your source Tim, really!)


Trouble Shooting

There are things Save A BNDL should do, but there is no safe way to do them. The DeskTop database is one of those things Apple hasn't provided quite enough documentation for or hooks into. I'm hoping this will change, but in the meantime I have to make do.

¥ If Save a BNDL appears without its spiffy icon, that means Save A BNDL needs its own BNDL info updated. Sounds like a job for Save A BNDL. Currently, I don't provide a solution to this chicken & egg problem, so you'll have to rebuild the desktop.

¥ If you have multiple volumes mounted, Save A BNDL sometimes appears to fail on files not located on the boot volume. Save A BNDL has actually done its work, it's convincing the Finder that's the problem. I'm working on a solution to this.

¥ Floppies (all disks < 2M) don't have DeskTop databases, so Save a BNDL doesn't affect them. Rebuild their desktops by mounting them with the cmd & option keys down.

¥ If the BNDL information being replaced has icons that the new BNDL doesn't,  the old icons are not deleted. E.g. originally you had an icn8 for an application, your new version doesn't, that old icn8 will still be in the DeskTop database and may show up in the Finder. You'll have to rebuild the DeskTop to fix this problem.


History?

1.0 - initial release

1.1 - added code to kill the File Sharing Extension (if running) before killing the Finder

1.2 - bug fix - when Save A BNDL was the only app running, restarting the Finder caused
        system error 41.

1.3 - bug fix - failed if any remote volumes were mounted.