HyperCard: Handler for Protecting Button Scripts (7/92)

Here's a handler that asks for user confirmation before deleting any button
that has a script.

on protectButton whichButton
if script of whichButton is empty
then exit protectButton
answer "Delete " & whichButton & "?" with "OK" or "Cancel"
if it is not "OK" then select empty
end protectButton


This article is adapted from the Claris Tech Info database.
Published Date: Feb 19, 2012