# Bug with Images

**URL:** <https://community.thunkable.com/t/bug-with-images/596495>\
**Category:** Questions about Thunkable X\
**Created:** [June 5, 2020, 11:44pm UTC](https://community.thunkable.com/t/bug-with-images/596495 "2020-06-05T23:44:50Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![David\_Wolber](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/david_wolber/32/117458_2.png) [@David\_Wolber](https://community.thunkable.com/u/David_Wolber)\
**Post date:** [June 5, 2020, 11:44pm UTC](https://community.thunkable.com/t/bug-with-images/596495/1 "2020-06-05T23:44:50Z")

</div>

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.

 ![Screen Shot 2020-06-05 at 4.36.48 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/e/0e093b7b1a183e63ff87b60211b79539ce0afa35.png)

Here is full description and source code:

> **[Picture Bug](https://docs.google.com/document/d/12sbbJl6m9uFLF9kykCJHAhfEzfNexqJ4SwFoHP3PuJM/edit?usp=sharing)**
>
> https://x.thunkable.com/copy/2127b9f350aacbd614f6d537fc57967c This code starts off with parks.jpg showing. When the button is clicked, it should change the Picture property to hopper.jpg, then immediately change to vaughan.jpg and display that. It...

---

<div class="post-metadata">

**Author:** ![jaythemanchs](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jaythemanchs/32/92809_2.png) [@jaythemanchs](https://community.thunkable.com/u/jaythemanchs)\
**Post date:** [June 6, 2020, 4:36am UTC](https://community.thunkable.com/t/bug-with-images/596495/2 "2020-06-06T04:36:53Z")

</div>

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

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/a/6/a6fbf5de0beca9f821fdcea98721792908b22f2d.jpeg)

Hope this helps, 😉.

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [June 6, 2020, 5:16am UTC](https://community.thunkable.com/t/bug-with-images/596495/3 "2020-06-06T05:16:48Z")

</div>

Check this

[https://x.thunkable.com/projects/5edb232dc6189c783d04c421/project/properties/designer/](https://x.thunkable.com/projects/5edb232dc6189c783d04c421/project/properties/designer/)

---

<div class="post-metadata">

**Author:** ![David\_Wolber](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/david_wolber/32/117458_2.png) [@David\_Wolber](https://community.thunkable.com/u/David_Wolber)\
**Post date:** [June 10, 2020, 12:05am UTC](https://community.thunkable.com/t/bug-with-images/596495/4 "2020-06-10T00:05:33Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![David\_Wolber](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/david_wolber/32/117458_2.png) [@David\_Wolber](https://community.thunkable.com/u/David_Wolber)\
**Post date:** [June 10, 2020, 12:06am UTC](https://community.thunkable.com/t/bug-with-images/596495/5 "2020-06-10T00:06:51Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [June 10, 2020, 7:42am UTC](https://community.thunkable.com/t/bug-with-images/596495/6 "2020-06-10T07:42:36Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jaythemanchs](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jaythemanchs/32/92809_2.png) [@jaythemanchs](https://community.thunkable.com/u/jaythemanchs)\
**Post date:** [June 10, 2020, 8:30am UTC](https://community.thunkable.com/t/bug-with-images/596495/7 "2020-06-10T08:30:53Z")

</div>

> [@David\_Wolber](#):
>
> 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?

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

---

<div class="post-metadata">

**Author:** ![domhnallohanlon](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/domhnallohanlon/32/29554_2.png) [@domhnallohanlon](https://community.thunkable.com/u/domhnallohanlon)\
**Post date:** [June 10, 2020, 10:57am UTC](https://community.thunkable.com/t/bug-with-images/596495/8 "2020-06-10T10:57:23Z")

</div>

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.

 ![label](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/1/1/1178c58b0a7dbda8839b9fede6f8c9e34191c3ce.png)

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.

 ![label_with_wait](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/5/0531c9bf357f41d1cfe566a8b062c68e057e93ca.png)

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

 ![image_with_wait](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/f/2/f2c2d572ee3f7f4c720d36e9dbba235b626a701b.png)

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.

 ![nesting](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/5/452a3d8a4068a36224ede595a059c506ab1aa137.png)

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?

---

<div class="post-metadata">

**Author:** ![David\_Wolber](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/david_wolber/32/117458_2.png) [@David\_Wolber](https://community.thunkable.com/u/David_Wolber)\
**Post date:** [June 11, 2020, 10:32pm UTC](https://community.thunkable.com/t/bug-with-images/596495/9 "2020-06-11T22:32:37Z")

</div>

Hi and thanks for the reply on this and for flagging [paulmw](http://community.thunkable.com/u/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.

Thanks,

Dave

---

<div class="post-metadata">

**Author:** ![darren](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/darren/32/69854_2.png) [@darren](https://community.thunkable.com/u/darren)\
**Post date:** [June 11, 2020, 11:18pm UTC](https://community.thunkable.com/t/bug-with-images/596495/10 "2020-06-11T23:18:39Z")

</div>

> [@domhnallohanlon](#):
>
> 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.

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](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/6/46d01fcfd7b9ffb899cca2441df476b9bf5d499d.png)

Or updating a component that was just cloned / created:

 ![Screen Shot 2020-06-11 at 6.15.50 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/f/b/fbf54c7ffd46c170ff3a695082b7f4ab338b96ae.png)

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 11:27am UTC](https://community.thunkable.com/t/bug-with-images/596495/11 "2024-11-08T11:27:07Z")

</div>


