"Set filename of image" does nothing if the file name has not changed.

Alex Tweedly alex at tweedly.net
Fri Jun 19 20:44:23 EDT 2020


Hi folks,

I'm trying to decide if this is a bug or just an oddity. (or a 
documentation deficiency).

Comments welcome to help me decide what bug report (if any) to file :-)

When I "set the filename of an image" to a file, I expected that the 
image should show the content of the file. And if I then go (outside the 
app) and change the file, that change will *not* be immediately 
reflected - but if I again "set the filename" (to the same value), it 
would then pick up the new, correct image data from the file.

However it doesn't. The 'filename' property has the correct value, but 
the image is not updated.

If I "set the filename to empty", and then "set the filename to (the 
file)" again then the image is updated.

(Kind of hard to describe well - see end of this email for another 
description).

Does that seem right ?  Or like a bug ?

The docs do say

> Setting an image's filename property to the name and
> location of a file deletes the previous contents of the image.
>
which to me means this should just work - but I could be persuaded 
otherwise.

Alex.

((Same description in step-by-step ....

1. copy bad.gif into this.gif (it's a bad file)

2. click on button - should show the bad image - that is, shows a blank 
image
        i.e.   set the filename of img "img1" to "...."

3. copy good.gif to this.gif (it's a good image)

4. click button again (doesn't fix it)
        i.e.   set the filename of img "img1" to "...."

5. shift-click button (does fix it)
        i.e.   set the filename of img "img1" to empty; set the filename 
of img "img1" to "...."






More information about the use-livecode mailing list