deleteWidget

Typemessage
DictionaryLCS
LibraryLiveCode Script
Syntax
deleteWidget
Associationswidget
Summary

Sent to a widget just before it is removed from the stack.

Introduced8.0
OSmac, windows, linux, ios, android, web
Platformsdesktop, server, mobile
Example
on deleteWidget
   -- Save the state by storing value in the stack
   dispatch "saveWidgetState" to this stack \
         with "the name of me,the cStateValue of me"
end deleteWidget
RelatedCommand: undo
Glossary: command, message, pass, trap
Object: stack, widget
Description

Handle the deleteWidget message if you want to perform cleanup before a widget is removed from the stack.

The actual deletion is not triggered by the deleteWidget message, so trapping the message and not allowing it to pass does not prevent the widget from being removed.

However, the undo command will restore a widget after it is deleted by the user.

Tagsobjects