In case you don’t read the announcements category
Good addition. But for beginners like me, why not show a blocks image for ‘How to Use’ purposes?
BTW, there are no images showing for this in my browser…
Have you taken a look at the Thunkable Docs? There are descriptions for the properties as well as some block examples.
https://docs.thunkable.com/thunkable-cross-platform/create/components/user-interface/alert
Yes I looked at that link, but all the graphics are cracked, and I can see nothing…
On the documentation page you do not see the images? Try to use another browser, for example, proxy the Tor browser. I don’t know exactly what the problem is, but in most of my browsers the information from the site documentation Thunkable does not appear as shown below, and some displays only the text. So I use Tor.
You can see information about Alert at the link
https://github.com/thunkable/docs-thunkable-com/blob/master/thunkable-cross-platform/create/components/user-interface/alert.md
Could you please give an example for alerts with more than one button.
How can I get the information, which button was pressed.
Could you show an example with blocks?
Thank you.
Great help.
In your example I see that you work with Json objects.
Is there no eaysier way, only working with simple test?
I found the „easy“ way myself.
Simply design the alerts in the Design window.
With the simple „show“ alert you can test, if it was confirmed (or not).
For the alert with more choices you can add these choices in the advanced description of the alert in the design window an simple add these choices.
In the blocks you can output the choice in the alert block for button.list and simply get the text pf the choosen item with ‚buttonpressed‘ (a simple text).
This way is more convenient for beginners.
You are right, for beginners it is easier to use properties on the Advanced tab.
But even with JSON it’s easy to work, especially after the following simplification
The variant with Label1.Text is more versatile than Button2.Text, since the first does not depend on the text on the buttons unlike the second option.
Hi rollke,
I didn’t follow with this solution. Can you show me a picture of what you mean? Were you saying to compare “buttonPressed” with the option you created in advanced tab? like if buttonPressed = OK
, or if buttonPressed = {"Text":"Go Back","Style":"cancel"}
? Either way is not working.
Thanks
See my very simple test for alerts:
https://x.thunkable.com/copy/c995b7b9c176ed05fc6895e6f738304e
Using Chrome would be better, knowing it has latest Security Patches and will load your images.
The latest version of Chrome also does not display information. IE displays only text. Tor shows everything.
Thank you very much. How stupid I am never thought about that is the right way. Learned a lot.
Hello, I’m a newbie so please have patience
Following your exapmle I wasn’t able to understand (with the easy way) how to detect which choice has been made after the popup comes out.
In the advanced properties of the alert I set “camera” “gallery” and “cancel” under the botton list
If I put “button pressed” in both “if blocks” what happen is that the gallery and the camera pops up one after the other following the order of the text button list in the advanced properties.
so I tried with the logics these two ways but nothing
in the MIT Appinventor I achieved such result this way:
but in Thunkable I cannot find something similar to the “compare text” block.
So the question in the end is what to put in the if block tho detect which button has been pressed, possibly based on button text?
Thank you very much in advance
Just tried the alert component for the first time. Thanks @albert and your @thunkable team for bringing this to the community! It works really smooth on iOS and is very useful. …and @actech has already explained how to use it …
I am not too sure, but from my experience, if you set the button list to all things with text (not confirmation or no), then when you do the if button pressed, if you pressed the first button, it would be “If Button pressed = 1, do” Same for second.
So if camera is the first one on your button list, then it would be one, and gallery would be 2.