Home
The HyperCard Center
HyperTalk Reference
Home » HyperTalk Reference » Properties

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

lockErrorDialogs

set [the] lockErrorDialogs to ¬ trueOrFalse

The lockErrorDialogs property returns or sets whether HyperCard, on encountering an error, presents an error dialog box.

This property defaults to false at idle time, meaning that error dialogs usually appear.

When this property is set to true, HyperCard, on encountering an error, does not display an error dialog box; instead, it sends the message errorDialog errorMessageText to the current card.

ErrorMessageText contains the text of the error dialog box.


Examples

set lockErrorDialogs to true

set lockErrorDialogs to false

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

trueOrFalse
Any expression that evaluates to the HyperTalk and AppleScript constants true or false.

For example:

true
false
the hilite of bg btn "Yes"
fld "Zip" contains "95014"
the short name of this stack is "Fred"


Related Topics

« location | HyperTalk Reference | lockMessages »

Version 0.7b1 (March 24, 2022)

Made with Macintosh

Switch to Retro View