Delete Confirmation Library

Bob Sneidar bobsneidar at iotecdigital.com
Thu Nov 16 12:37:14 EST 2023


<sigh> The real fix for this would be to have the engine pass the long id of the object with the message, so I could use: 

on deleteButton pObjectID
   …
end deleteButton

However I am reticent to create yet another enhancement request. :-)

Bob S


> On Nov 16, 2023, at 9:08 AM, Bob Sneidar via use-livecode <use-livecode at lists.runrev.com> wrote:
> 
> 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
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode



More information about the use-livecode mailing list