Hi,
I have built a Slide Show stack, which displays the images of a long image file list.
When resetting the stack, the last shown image is still sitting there: script lines like
set the filename of image XY to empty
set the ID of image XX to 0
are ignored without message: the image keeps its filename and its ID.
However the msg box command "set the filename of image XY to empty" gets executed.
Do I have to delete the image (and to recreate it before next run) ?
Thanks in advance
Peter
Can't get rid of my last image by scripting
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: Can't get rid of my last image by scripting
Hi Peter,
I'm not sure if we are allowed to set any ID to ZERO!?
Does it work if you comment that line out?
Best
Klaus
I'm not sure if we are allowed to set any ID to ZERO!?
Does it work if you comment that line out?
Best
Klaus
-
- Livecode Opensource Backer
- Posts: 9385
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Can't get rid of my last image by scripting
Well, here we are . . .
, . . I just opened a new stack, 700 x 700 pixels with an image in it "PIC", 600,600
and set it's image source to a rather silly picture on my desktop.
I noticed one of two interesting things:
1. The filename of the image did NOT change when I set its image source.
2. The ID of the image did NOT change when I set its image source.
And, quite frankly, that really doesn't seem relevant.
HOWEVER . . . Boom-Boom-Boom-Ba-Di-Boom!
When I ran this script in a button:
image "PIC" went blank.
Mind you, this:
had the same effect.
I was doing this on a Macintosh running MacOS 10.14.6.
So . . .
Question #1: What OS is LiveCode running on with you?
Question #2: Check your code again, and ask yourself if something else might not be b*gg*ring things up.
, . . I just opened a new stack, 700 x 700 pixels with an image in it "PIC", 600,600
and set it's image source to a rather silly picture on my desktop.
I noticed one of two interesting things:
1. The filename of the image did NOT change when I set its image source.
2. The ID of the image did NOT change when I set its image source.
And, quite frankly, that really doesn't seem relevant.
HOWEVER . . . Boom-Boom-Boom-Ba-Di-Boom!
When I ran this script in a button:
Code: Select all
on mouseUp
set the fileName of image "PIC" to " "
end mouseUp
Mind you, this:
Code: Select all
on mouseUp
set the fileName of image "PIC" to empty
end mouseUp
I was doing this on a Macintosh running MacOS 10.14.6.
So . . .
Question #1: What OS is LiveCode running on with you?
Question #2: Check your code again, and ask yourself if something else might not be b*gg*ring things up.
Re: Can't get rid of my last image by scripting
Thank you, Klaus,
thank you, richmond62.
Peter
thank you, richmond62.
Peter