ikarus1969 wrote: ↑December 18th, 2018, 5:09 am
For this i have the "UpdateMeter" in the "FinishAction" of the WebParser measure.
Yes, you have it, however doesn't really help, because the Update of the whole skin is set to
Update=1000, which means the [Meter_PIC] meter is anyway updated with at most one second after the [Measure_PIC] measure downloads the image. However
IF THE IMAGE HAS NEVER BEEN DOWNLOADED BEFORE, the image doesn't appear when the measure gets the image for the very first time. I repeat: if the image has been already downloaded and cached and it exist in the specified place (
DownloadFile\Earth.jpg), it is shown up immediately. But if hasn't been, well in this case I have to load the skin which downloads the image which doesn't appear, then have to refresh the skin and after this the image is shown properly.
All this can be easily avoided either adding a
DyanmicVariables=1 option to the [Meter_PIC] meter, either using a MeasureName option instead of ImageName on the Image meter. Me personally always would prefere to use MeasureName instead of ImageName, but it's not mandatory.
I think when you first tried out the code, you didn't notice the thing that the image doesn't appear at first time, than later, when you worked with the skin, the previously downloaded image already existed and was used and this is why you didn't notice the problem. Don't misunderstand me, your code is indeed great and finding that source was a useful step (probably for both GTI.H and me and probably for many others). I just noticed this mistake and wanted to fix it.
And one more: !UpdateMeter without !Redraw is completely useless. These two bangs have to be used together, because if at a given moment you're updating a meter but you don't redraw it, you anyway won't see anything, just after the next update cycle, when a redrawn is done anyway. So, the
FinishAction=[!UpdateMeter "Meter_PIC"] option in fact should have to be
FinishAction=[!UpdateMeter "Meter_PIC"][!Redraw].