Empty Alert Message

Hello, my students are working on a quotes feature. When the quote button is clicked, an alert shows up with one of the quotes in the list. The issue is the alert message always shows up as empty at first and then it shows a random quote after the second click.

I have tried solutions such as adding a 0.1 second delaying, setting the alert messages before showing them, adding a message to the invisible component but nothing has worked yet.

What’s happening is that the alert message completes its function before the set/random function is called.

The “then do” section of a function always runs after the function is completed.

So you need to assign a variable’s value to the randomizer first and then call the alert function to display the variable.

The order of your blocks should be:

  1. Set variable to random message
  2. Set alert message to variable
  3. Show alert

And actually, you don’t technically need a variable here. You can simply just move the green block above the purple one.

That solution worked, thank you! Oddly enough when I tried it earlier it wasn’t working, maybe it was the mobile app’s response time to the changes in the blocks.

Yes, Thunkable Live can cache a project and not display the current version. It’s unnerving and the cause of much wasted time for me.

I haven’t yet found a reliable way to determine if I’m seeing the current project version except for making an obvious change like altering a label’s text.

@conroy is there something you all do in-house to verify that a live test on Thunkable Live is not cached?