moving images between stacks

Edwin Gore edgore at shinra.com
Fri Jul 25 16:59:01 EDT 2003


I'm working on my routine to update settings files again, and I have run into a problem.

The old settings file has 5 images in it, that are later exported out to image files. The user can customize these, so the contents of the image might be the original pasted in images that I put in there, or they might be references to an external file.

When the new settings file is created, it has the defaults for these images pasted into it as well. What I want to do is take the images from the old settings file, and put them into the iamge file with the same name in the new settings file.

Both files are stacks. The old file that I am testing with has the image "default" set to a reference to a file on disk.

I have tried everything I can thing of...

put image "default" of card 1 of stack "old" \
into image "default" of card 1 of stack "new"

Doesn't work, and in fact clears the images, though they are still there, they have no picture in them - they are empty, transparent objects.

set the imagedata of image "default" of card 1 of \ stack "new" to the imagedata of image "default" of \
card 1 of stack "old"

Doesn't work either - the images in the new file are still the default ones.

I'm at a loss. I know that I could copy/paste/position to bruteforce this, but there must be something more elegant...



More information about the use-livecode mailing list