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.

cantModify

 set [the] cantModify of stack ¬
     to trueOrFalse
The cantModify property returns or sets whether a stack can be changed in any way. It corresponds to the Can’t Modify check box in the Protect Stack dialog box.

Setting the cantModify of a stack to true selects both the Can’t Modify Stack check box and the Can’t Delete Stack check box in the Protect Stack dialog box. When cantModify is true, a padlock appears in the menu bar.

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


Demo Script

on cantModifyDemo
    -- Test whether a stack is locked from the Finder, is on locked 
    -- media, or is in a read-only folder on a shared volume. If it is, 
    -- you can't set cantModify to false
    set cantModify of this stack to false
    if cantModify of this stack is true then 
       answer "This stack is locked or is on locked media."
    else answer "This stack is not locked."
 end cantModifyDemo

Placeholders

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

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

« cantDelete | HyperTalk Reference | cantPeek »


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.

cantModify

 set [the] cantModify of stack ¬
     to trueOrFalse
The cantModify property returns or sets whether a stack can be changed in any way. It corresponds to the Can’t Modify check box in the Protect Stack dialog box.

Setting the cantModify of a stack to true selects both the Can’t Modify Stack check box and the Can’t Delete Stack check box in the Protect Stack dialog box. When cantModify is true, a padlock appears in the menu bar.

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


Demo Script

on cantModifyDemo
    -- Test whether a stack is locked from the Finder, is on locked 
    -- media, or is in a read-only folder on a shared volume. If it is, 
    -- you can't set cantModify to false
    set cantModify of this stack to false
    if cantModify of this stack is true then 
       answer "This stack is locked or is on locked media."
    else answer "This stack is not locked."
 end cantModifyDemo

Placeholders

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

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

« cantDelete | HyperTalk Reference | cantPeek »

Version 0.7b1 (March 24, 2022)

Made with Macintosh

Switch to Retro View