It seems like this was working for me before but now when I add an Any Button block to any of my projects, the screen(s) with that block stop working. Even if the Any Button block doesn’t have any blocks inside, it still prevents all other blocks in the screen from working. Once I remove the Any Button block, everything else works again. I also tried Any Screen, etc. and they are all having this issue.
Ultimately, what I’m trying to do is to get the number of the button that is clicked. So if I have five buttons on the screen and I click the 2nd one, it returns “2”. But I don’t see a way to do that and nothing was working so I simplified the example above. But this is as close as I got:
Here’s a sample project where I’m seeing the simple version of the problem:
Thanks. Also, do you happen to have an idea how I might return the order # of the button I click? I explained that above but wasn’t sure if there’s any way to do it.
I had figured this out in another part of my project and forgot because it wasn’t working due to the bug. Sorry for the trouble! Here’s the way it works correctly when downloaded to a device:
To explain, I’m using the variable “thumbnail” to pass the index of the button (in this case an actual thumbnail photo of a person) to the next screen where a larger version of the same photo is displayed. So if the first thumbnail is clicked, it passes “1” and if the fifth thumbnail is clicked, it passes “5”, etc.
The problem with the index can occur only in one case - you use asynchronous blocks in a synchronous environment. Simply put, you need a certain order of components on the screen, but you do not synchronize the operation of asynchronous blocks for this. May I ask you to explain the problem in more detail? Now I do not understand it.
If you use a recursive function to create clones, as in my example with AirTable, where buttons are created, then there should be no problems with the index.
I’ve created two separate screens for these thumbnail images / student directory: one using clones and one without. They are both working properly with the index variable but updating the information from AirTable is very slow. So I keep trying different methods.
Are you running the production version of the app from the App Store or the Test Flight version? Also, can you post which version of the Thunkable Live app you are running? One way to do that is to go back to the project list in the app and press and hold the “thunkable” label at the top of the app. Finally, what phone and iOS version are you running?
Thanks, I actually had solved it… I just didn’t realize it was correct because the bug was preventing it from working. My solution is similiar to what’s in the link you posted: using the component block in an Any Button block to determine which button was clicked.