Question about deleting all the graphics on a card

Doug Lerner doug at webcrossing.com
Fri Jan 23 01:07:04 EST 2004


The following loop:

  repeat with i = 1 to the number of graphics
    delete graphic (the short name of graphic i)
  end repeat

doesn't work right because while the loop is running Rev seems to renumber
the graphics (hah!) so at some point a "missing object" error will occur.

I can run through the loop twice:

First pass: collect the names of the graphics
Second pass: delete the graphics

But is there a better way?

Thanks,

doug
 



More information about the use-livecode mailing list