Filename of an image

maring.richard maring.richard at gmail.com
Sat Feb 14 20:40:54 EST 2015


Peter,

No way I've found to turn off or manually do anything with the cache. I'm using LC 7.01 rc2 and when I moved to it is when this became a problem for me. 

It should only be a problem when the image name is unchanged. As the system can still find that name in the cache even though you deleted the physical file on the drive. 

The physical file needs to be removed and by putting a different file name or some interim junk in the filename reference allows the cache to release it's copy. 

Rich



Sent via the Samsung Galaxy Note® 4, an AT&T 4G LTE smartphone


-------- Original message --------
From: Peter Haworth <pete at lcsql.com> 
Date: 02/14/2015  7:29 PM  (GMT-06:00) 
To: How to use LiveCode <use-livecode at lists.runrev.com> 
Subject: Re: Filename of an image 

Thanks Rich.  I've temporarily been working round the issue by deleting the
image and creating a new one as you mentioned. Fortunately, there's only
one image with the filename in question.

I was hoping there'd be a more elegant solution than deleting and creating
a new image but maybe that's the way it is.  I guess I could create my
image file with a different name every time I create it.

Sounds like there should be a way to switch off image caching.

On Sat Feb 14 2015 at 5:04:56 PM maring.richard <maring.richard at gmail.com>
wrote:

> Peter,
>
> It is indeed the cache. I spent an entire day trying to figure this one
> out.  I finally found that if there is any reference to that filename in
> any image container anywhere in your code the cache will not release it.
>
> Also changing the image file and reloading it will not clear it from cache
> either as the file was never deleted.
>
> What worked for me was to delete the original image file. The I put the
> word "junk" into the filename of every occurrence of that image container.
> Did a wait of 5 milliseconds then loaded any modified copy of the original
> and it worked.
>
> I had a scratch stack that I occasionally placed substances in for various
> reasons. I found that one of them had an image container that had my image
> filename in it and it was the reason the cache wasn't releasing the file.
> Had forgotten it was even there. It is never called or opened but the cache
> new it was there.
>
> Hope this helps point you in a direction that helps.
>
> Rich Maring
>
>
>
>
> Sent via the Samsung Galaxy Note® 4, an AT&T 4G LTE smartphone
>
>
> -------- Original message --------
> From: Peter Haworth <pete at lcsql.com>
> Date: 02/14/2015  6:32 PM  (GMT-06:00)
> To: How to use LiveCode <use-livecode at lists.runrev.com>
> Subject: Filename of an image
>
> If I set the filename of an image, it correctly loads that file into the
> image.
>
> Say I then change the contents of the file - if I set the filename of the
> image again, the original file contents remain in the image, presumably
> because of some caching effect.
>
> Is there a way to force the image to be reloaded from the file?  I tried
> setting the filename to empty but that gave me an error (in the message
> box).
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
_______________________________________________
use-livecode mailing list
use-livecode at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


More information about the use-livecode mailing list