<doc>
  <legacy_id>1226</legacy_id>
  <name>cantDelete</name>
  <type>property</type>
  <syntax>
    <example>set the cantDelete of {<i>card </i>| <i>group </i>| <i>stack</i>} to {true | false}</example>
  </syntax>
  <library></library>
  <objects>
    <group/>
  </objects>
  <synonyms>
  </synonyms>
  <classification>
    <category>Developing with LiveCode</category>
  </classification>
  <references>
    <command tag="delete">delete Command</command>
    <message tag="deleteStack">deleteStack Message</message>
    <command tag="delete stack">delete stack Command</command>
    <message tag="deleteCard">deleteCard Message</message>
    <message tag="deleteGroup">deleteGroup Message</message>
    <property tag="cantModify">cantModify Property</property>
  </references>
  <history>
    <introduced version="1.0">Added.</introduced>
  </history>
  <platforms>
    <mac/>
    <windows/>
    <linux/>
    <ios/>
    <android/>
  </platforms>
  <classes>
    <desktop/>
    <server/>
    <web/>
    <mobile/>
  </classes>
  <security>
  </security>
  <summary>Specifies whether an <glossary tag="object">object</glossary> can be deleted.</summary>
  <examples>
    <example>set the cantDelete of this card to true</example>
  </examples>
  <description>
    <p>Use the <b>cantDelete</b> <glossary tag="property">property</glossary> to protect a <object tag="stack">stack</object> or part of a <object tag="stack">stack</object> against accidental deletion.</p><p/><p><b>Value:</b></p><p>The <b>cantDelete</b> of a <keyword tag="card">card</keyword>, <object tag="group">background</object>, or <object tag="stack">stack</object> is true or false.</p><p/><p>By default, the <b>cantDelete</b> <glossary tag="property">property</glossary> of newly created <glossary tag="object">objects</glossary> is set to false.</p><p/><p><b>Comments:</b></p><p>If an object's <b>cantDelete</b> <glossary tag="property">property</glossary> is set to true, the <glossary tag="object">object</glossary> cannot be deleted either by user action or by a <glossary tag="handler">handler</glossary>. If you want to delete the <glossary tag="object">object</glossary>, you must first set its <b>cantDelete</b> to false.</p><p/><p>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.</p><p/><p>Setting a stack's <b>cantDelete</b> <glossary tag="property">property</glossary> to true does not prevent the user from deleting the <keyword tag="file">file</keyword> containing the stack by putting it in the Trash or Recycle Bin, or deleting it with a <function tag="shell">shell</function> command or system script.</p>
  </description>
</doc>