Bizarre problem of disappearing pictures on reducing stack size

Stgoldberg at aol.com Stgoldberg at aol.com
Mon Oct 3 16:32:52 EDT 2005


I've created a stack containing several hundred cards, each with a jpeg of   
a radiologic image.   In order to test students, each x-ray is unlabeled with 
arrows.   In order to provide a clue to the student, I've prepared a duplicate 
hidden picture on each card with the same picture, but with arrows pointing 
to   key areas to look at.   The duplicate picture is titled "arrows" and is 
set to be hidden, until the student clicks on a button titled "hint" which 
contains the script '"show image "arrows"'.   In order to create the duplicate 
picture, I copied and immediately pasted the original picture on the same site on 
the card.   I then opened the image editor and put in the arrows and updated 
the picture.

I recently phrased the question to the forum as to whether it was possible to 
minimize the stack size, since so many of the original pictures were resized 
right on the card. Apparently, just resizing the images and   locking the size 
and position on the card does not reduce the size of the stack. So, Phil 
Davis suggested an excellent brief way to do this through the following script:

on mouseUp
    -- first, prevent the image from expanding when reset
    set the lockLoc of img "myImage" to true

    -- reset the image's data
    put the imageData of img "myImage" into tData
    set the imageData of img "myImage" to tData
end mouseUp

In order to try this on the entire stack, I modified the script a bit 
(fortunately I made a backup stack first):

repeat with x = 1 to the number of cards
go to card x
repeat with y = 1 to the number of images
if there is an image y then 
put the imageData of img y into tData
set the imageData of img y to tData
end if
end repeat
end repeat

This indeed did significantly reduce the stack size.   However, all of the 
"arrows" pictures in the stack disappeared. They would no longer appear with the 
command   'show image "arrows"' or on turning on "Show Invisible Objects" 
from the view menu.   The "arrows" pictures could not be found, but strangely 
they still were listed in the Application Browser.   Does anyone have any 
suggestion as to how to account for this?   The only thing I can think of is that the 
original pictures can be found in the Finder.   The duplicated pictures, as 
always, cannot.   Perhaps this has something to do with it.   Thanks very much.
Steve Goldberg



More information about the use-livecode mailing list