You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<summary>Sent to an <keyword tag="image">image</keyword> just before it is removed from the <object tag="stack">stack</object>.</summary>
<examples>
<example>on deleteImage</p><p> export the target to file "Saved"</p><p> pass deleteImage</p><p>end deleteImage</example>
</examples>
<description>
<p>Handle the <b>deleteImage</b> message if you want to perform cleanup before an <keyword tag="image">image</keyword> is removed from the <object tag="stack">stack</object>.</p><p/><p><b>Comments:</b></p><p>The actual deletion is not triggered by the <b>deleteImage</b> <keyword tag="message box">message</keyword>, so <glossary tag="trap">trapping</glossary> the <keyword tag="message box">message</keyword> and not allowing it to <control_st tag="pass">pass</control_st> does not prevent the <keyword tag="image">image</keyword> from being removed.</p><p/><p>However, the <b>undo</b> <glossary tag="command">command</glossary> will restore an <keyword tag="image">image</keyword> after it is deleted by the user. For example, the following <glossary tag="handler">handler</glossary>, placed in a <keyword tag="card">card</keyword> or stack <property tag="script">script</property>, effectively prevents an <keyword tag="image">image</keyword> from being deleted by the user:</p><p/><p><code> on deleteImage</code></p><p><code> beep</code></p><p><code> send "undo" to this card in 5 milliseconds</code></p><p><code> end deleteImage</code></p>