Showing images from the web

In VASL, we use counters with labels to display images from the internet. We create basic counters with label traits added. We paste HTML containing a link to the image into the labels and the counter then displays the image.

I am trying to ensure that we are correctly handling any errors that might arise.

If we paste a link that does not return an image, we get a “broken picture” display instead. In the past, this problem has resulted in a VASL crash but does not seem to do so anymore. Is VASSAL now handling this?

I also want to be sure that a “deadlink” will also not produce a crash. By deadlink, I mean a link that used to work but no longer does (the image has been removed, the url has changed, etc). I have tried to emulate this situation by first successfully loading and image and then adjusting the html so that it is looking for an image that does not actually exist. Again, I end up with the “broken pictue” display. This is good; it clearly indicates to the user that something is wrong with the html or the source of the image. And no crash occurs. Is VASSAL handling this?

Where does this all get done in VASSAL? Counters.Labeler?

Hi Doug,

I’m laughing because this is so far outside the design parameters for Vassal:)

Vassal does none of this, it is all being handled by the html engine built in to Java swing components. The changing behavior over time is due to changes to the java version we bundle with Vassal.

Ha Ha!

I was prepared to give you guys all the credit! You don’t get as much as you deserve.

Well this gives me a lot of comfort that we can plan on some reliability around how these particular image problems will be handled.

Thanks for the reply as always