Delete Confirmation Library

Bob Sneidar bobsneidar at iotecdigital.com
Thu Nov 16 12:08:29 EST 2023


Hi all. 

I’m working on a delete confirmation library. In the following script however, getting the short name of the selectedObject fails silently even if the script only stack is inserted into the front. In the message box the same line of code works. 

on deleteButton
   beep
   put the short name of the selectedObject into tObjectName
   answer warning \
         "Are you sure you want to delete button ‘“ & tObjectName & "'?" \
         with "Delete" or "Cancel" \
         as sheet
   if it is "Cancel" then send "undo" to this card in 5 milliseconds
end deleteButton

Any idea why?

Bob S



More information about the use-livecode mailing list