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.

cantDelete

 set [the] cantDelete of card ¬
    to trueOrFalse
set [the] cantDelete of bkgnd ¬
    to trueOrFalse
set [the] cantDelete of stack ¬
    to trueOrFalse
The cantDelete property returns or sets whether a user can delete a specified card, background, or stack. It corresponds to the Can’t Delete check box in the Card Info, Background Info, and Protect Stack dialog boxes.

The default value is false (meaning that a card, background, or stack can be deleted).

Note: Setting the cantDelete of a stack to true doesn't prevent the user from deleting the stack by dragging it to the Trash.


Demo Script

on cantDeleteDemo
   set cantDelete of this card to true
   domenu "Delete Card" 
 end cantDeleteDemo

Placeholders

card
An expression that identifies a card by name, number, or id using one of the following forms (in AppleScript, use “background” in place of “bkgnd”):

recent card
back
forth
card id posInteger [of bkgnd ]card text [of bkgnd ] -- namecard posInteger [of bkgnd ] -- numberordinal card [of bkgnd ]position card [of bkgnd ]

ordinal marked cardposition marked cardmarked card posInteger

For example:

card id 3894
card "Index"
card 1 of background 1
prev card
previous card of this background
next card
this card
first card
last card
middle card
any card
first marked card
last marked card
next marked card
previous marked card
marked card 1
marked card (the number of marked cards)
When used inside a card script in HyperTalk:
me
When a card receives a message:
[the] target
See also: button and field

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"


bkgnd
A HyperTalk expression that identifies a background by name, number, or id, using one of the following forms:

bkgnd id posInteger
bkgnd text -- name
bkgnd posInteger -- number
ordinal bkgnd
position bkgnd


For example:
bkgnd id 3894
bkgnd "Index"
bkgnd 1
prev bkgnd
previous bkgnd
next bkgnd
this bkgnd
first bkgnd
last bkgnd
middle bkgnd
any bkgnd
From within a background script, the term me refers to that background.
When a background receives a the message [the] target, that message is referring to the background.

See also: card

stack
An expression that identifies a stack by its name, using one of the following forms:

this stack
stack text -- name or path name


For example:

stack "Home"
stack "Simonides:School:References"
this stack
stack "HD:Stacks:Addresses alias
When used inside a stack script:
me
When a stack receives a message:[the] target

Related Topics

« cantAbort | HyperTalk Reference | cantModify »


Version 0.7b1 (March 24, 2022)

Made with Macintosh

Switch to Modern View

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.

cantDelete

 set [the] cantDelete of card ¬
    to trueOrFalse
set [the] cantDelete of bkgnd ¬
    to trueOrFalse
set [the] cantDelete of stack ¬
    to trueOrFalse
The cantDelete property returns or sets whether a user can delete a specified card, background, or stack. It corresponds to the Can’t Delete check box in the Card Info, Background Info, and Protect Stack dialog boxes.

The default value is false (meaning that a card, background, or stack can be deleted).

Note: Setting the cantDelete of a stack to true doesn't prevent the user from deleting the stack by dragging it to the Trash.


Demo Script

on cantDeleteDemo
   set cantDelete of this card to true
   domenu "Delete Card" 
 end cantDeleteDemo

Placeholders

card
An expression that identifies a card by name, number, or id using one of the following forms (in AppleScript, use “background” in place of “bkgnd”):

recent card
back
forth
card id posInteger [of bkgnd ]card text [of bkgnd ] -- namecard posInteger [of bkgnd ] -- numberordinal card [of bkgnd ]position card [of bkgnd ]

ordinal marked cardposition marked cardmarked card posInteger

For example:

card id 3894
card "Index"
card 1 of background 1
prev card
previous card of this background
next card
this card
first card
last card
middle card
any card
first marked card
last marked card
next marked card
previous marked card
marked card 1
marked card (the number of marked cards)
When used inside a card script in HyperTalk:
me
When a card receives a message:
[the] target
See also: button and field

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"


bkgnd
A HyperTalk expression that identifies a background by name, number, or id, using one of the following forms:

bkgnd id posInteger
bkgnd text -- name
bkgnd posInteger -- number
ordinal bkgnd
position bkgnd


For example:
bkgnd id 3894
bkgnd "Index"
bkgnd 1
prev bkgnd
previous bkgnd
next bkgnd
this bkgnd
first bkgnd
last bkgnd
middle bkgnd
any bkgnd
From within a background script, the term me refers to that background.
When a background receives a the message [the] target, that message is referring to the background.

See also: card

stack
An expression that identifies a stack by its name, using one of the following forms:

this stack
stack text -- name or path name


For example:

stack "Home"
stack "Simonides:School:References"
this stack
stack "HD:Stacks:Addresses alias
When used inside a stack script:
me
When a stack receives a message:[the] target

Related Topics

« cantAbort | HyperTalk Reference | cantModify »

Version 0.7b1 (March 24, 2022)

Made with Macintosh

Switch to Retro View