HyperCard 1.1: Workaround For "Delete Card" Issue

Users of HyperCard 1.1 stacks find that an attempt to do a "delete card" sometimes calls up an error message -- "Unexpected error 54321" -- and a "sorry" button, which quits HyperCard. (This problem does not occur with HyperCard 1.0.1.)
This is an issue with HyperCard 1.1: if there is an "onOpen Card" handler on the card after the one you are attempting to delete, or an "onDelete Card" handler in the script of the card you are trying to delete, when you try to delete that card, you receive the error. If there is an "onDelete Card" or "onOpen Card" handler in the background -- or stack -- script, you also get the error when you try to delete the card.

An example of this can be seen in any HyperCard 1.1 Home stack. When trying to delete the card titled, "Look for Documents In:", you get the error. In the script for the last card in the Home stack, there is an "onOpen Card" section of code.

The Workaround
Insert two hyphens and a space before each line of the above-mentioned code. You can then delete that card.
Published Date: Feb 18, 2012