Image cache question
phil at liverpool.ac.uk
Thu May 22 04:26:45 EDT 2014
if you have more than one reference to the same image, then you'd presumably have to set all of their filenames to something else, then the old image would be removed from the cache, but yes - what I'm doing is just setting the filename of the image to empty and then back to the filename of the (now modified) image on disk and LiveCode loads that newly modified image into its image cache and displays it. I agree that the documentation should say something about this - I had no idea that was how this worked and spent a while looking for something that would flush the cache etc. etc. before posting here and getting the very helpful response from Ben.
On 21 May 2014, at 16:44, Devin Asay <devin_asay at byu.edu> wrote:
> On May 21, 2014, at 8:08 AM, Phil Jimmieson <phil at liverpool.ac.uk> wrote:
>> Hi Ben,
>> thanks. That works perfectly. No complicated commands or anything.
>> On 21 May 2014, at 15:01, Benjamin Beaumont <ben at runrev.com> wrote:
>>> Hi Phil,
>>> This was discussed by the team at the time. There is no special handling
>>> for the changing of images currently referenced by the cache. I spoke to
>>> one of the engineers and he suggested unsetting the reference to the image
>>> as the cache will release images that no longer have a reference. Reseting
>>> the filename will cause the image the be recached in it's new form.
> Phil, Ben,
> Do you mean all you have to do is set the filename property of the image to empty, then set it to the external file reference again? The dictionary ought to be updated, or a note added, to alert users on how to do this.
> Devin Asay
> Learn to code with LiveCode University
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
Phil Jimmieson phil at liverpool.ac.uk (UK) 0151 795 4236
Computer Science Dept., Liverpool University, Ashton Building, Ashton Street
Liverpool L69 3BX http://www.csc.liv.ac.uk/~phil/
I used to sit on a special medical board... ...but now I use this ointment.
More information about the Use-livecode