Bug with Images

I’m getting a bug with the following code, which has two distinct “if” conditions and should, on the first click, show vaughan.jpg. I think its a Thunkable bug.

Here is full description and source code:

1 Like

Ok, something I noticed was that you are using a text/string. I would not suggest that. Instead try using the preset.

Hope this helps, :wink:.

Check this


Thanks, this didn’t fix it though. Could you say more about why you wouldn’t suggest using the red string blocks in this context?

Thanks for the sample. I’m working on a tutorial though and need the example I showed to work

1 Like

Are you writing a tutorial on Thunkable X? In that case, I can only wish you success in this matter.

Well first of all, photos have capitals and lower case letters as well as symbols. I think thunkable may have a glitch because text boxes don’t always work for me. Hope this helps

Hey @David_Wolber, hope you’re keeping well - thanks for flagging this and for the detailed report.

I think this is getting into the territory of “fast blocks” and “slow blocks”…which I think can cause some unexpected behaviours…and probably deserves a post of its own.

Here’s a quick run-down of what I’ve found so far.

Initially I thought that this was just an issue with the image not updating quickly enough, so I tried it with a label too to check.

Sure enough this exhibited the same behaviour that you reported for the image, so the first click shows 2 and a second click is needed to show 3.

The current work-around for this is to add a wait of 0 seconds like so.

This will change the number from 1 to 3, and similarly the image will change from parks.jpg to vaughan.jpg with these blocks.

I thought I might be able to get it working with nesting, but unfortunately this too requires the wait of 0 seconds to get it working as you want it.

I’m going to send this to @paulmw to take a look as he knows more about this than I do.

In the mean time can I ask what the objective for this tutorial is? Is it to demonstrate that the blocks (should) run sequentially from top to bottom? Or is it more of a general intro to conditional statements?

Hi and thanks for the reply on this and for flagging paulmw

You are right that this is a more general issue. Programmers expect sequential order and one command completing prior to another in the context of an event handler.

Thunkable changed, I believe, recently, because blocks like this used to work. I believe the old model was memory slots would change in an event handler, but the UI wouldn’t update until after event handler completes, and sequential order worked.

In regards to your question, I’m writing a book on tutorial with lots of tutorials. This specific one is for an if and if-else lesson, but of course this issue is a common one, which is why I’m surprised it hasn’t been flagged before.



Yes please. Some more guidance here would be great.

I’ve noticed having to use the wait in other places like when updating an alert message:
Screen Shot 2020-06-11 at 6.14.44 PM

Or updating a component that was just cloned / created:
Screen Shot 2020-06-11 at 6.15.50 PM