Home
The HyperCard Center
HyperTalk Reference
Home » HyperTalk Reference » System messages

Note: This is a work in progress and will be formatting errors. Read more about the project on the home page.

errorDialog

errorDialog errorMessageText
Handler:

on errorDialog whatText
   statements
end errorDialog
HyperCard sends the errorDialog message and its text to the current card if it encounters an error when the lockErrorDialogs property is set true.

(In such a case, the ordinary error dialog box is not displayed.)

errorMessageText is the contents of the error dialog box that would be displayed if the lockErrorDialogs property were false.


Examples

on errorDialog what
  if what is "User level is too low to edit scripts." 
  then set userLevel to 5
end errorDialog

Demo Script

on errorDemo
   set the cantDelete of this card to true
   set lockErrorDialogs to true
   doMenu "Delete Card"
 end errorDemo
 

 -- handler in the script of this card
 on errorDialog whichError
   answer "Had lockErrorDialogs not been set to true," &&¬
   "HyperCard would have displayed the error, “" & whichError & "”"
 end errorDialog

Placeholders

statements
Any return-separated list of built-in commands, user-defined handlers, or keywords that are part of a message or function handler.

put "Hello world"   -- built-in command
get total(field 1)  -- function call
global HelpInfo     -- keyword


Related Topics

« deleteStack | HyperTalk Reference | exitField »

Version 0.7b1 (March 24, 2022)

Made with Macintosh

Switch to Retro View