How do I delete cloned images with the same name all at once?

Lagi Pittas iphonelagi at gmail.com
Thu Jan 18 06:08:35 EST 2018


Hi William

First off - the send is outside the repeat but I assume that's an error in
transcribing to the email.

but this works

on mouseUp
   local gone, x
   repeat with x= 1 to the number of images of this card
      if the short name of image x is "ticket" then
         put the id of image x into gone
        delete image ID gone
      end if
   end repeat
end mouseUp

the  name gives "image ticket" so it will never succeed.

Lagi


On 17 January 2018 at 22:25, William de Smet via use-livecode <
use-livecode at lists.runrev.com> wrote:

> Hi there,
>
> I have several cloned images and all have the same name: ticket.
> Of course there ID is different.
> On close card I want to delete them.
> How do I delete them all at once?
> Wat is wrong with this code?
>
> on mouseup
> repeat with x= 1 to the number of images of this card
> if the name of image x is "ticket" then put the ID of image x into GONE
> end repeat
> send ("delete GONE") to me in 0 ticks
> end mouseup
>
>
>
>
> greetings,
>
> William
> _______________________________________________
> 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