cantDelete

Typeproperty
DictionaryLCS
LibraryLiveCode Script
Syntax
set the cantDelete of {<card> | <group> | <stack>} to {true | false}
Associationscard, group, stack
Summary

Specifies whether an object can be deleted.

Introduced1.0
OSmac, windows, linux, ios, android
Platformsdesktop, server, mobile
Example
set the cantDelete of this card to true
Values
NameTypeDescription
Value

The cantDelete of a card, background, or stack is true or false. By default, the cantDelete property of newly created objects is set to false.

RelatedProperty: cantModify
Message: deleteCard, deleteStack, deleteGroup
Keyword: card, file
Glossary: object, property, handler, background, object
Function: shell
Command: delete, delete stack
Object: stack
Description

Use the cantDelete property to protect a stack or part of a stack against accidental deletion.

If an object's cantDelete property is set to true, the object cannot be deleted either by user action or by a handler. If you want to delete the object, you must first set its cantDelete to false.

Deleting a card, background, or substack removes it permanently if the stack is saved after the deletion. Deleting a main stack removes it from memory, but does not remove its file from the user's system.

Setting a stack's cantDelete property to true does not prevent the user from deleting the file containing the stack by putting it in the Trash or Recycle Bin, or deleting it with a shell command or system script.