First of all, here's my code:
Now, I don't know how my code is working and my confusions are-
My function get_component_info
, it is returning the value dictionary
or the local component_type
?
also, here's the .aia file: Math_reminder.aia (921.6 KB)
What I am really trying to do is that I am giving the ability to buttons to toggle on/off their respected switch components defined in the dictionary learn
.
So what's your exact doubt ??? that you made a code yourself & don't know how it works ?
your function is returning the component_type
local variable.
The local variable is determinate by dictionary
after doing the code on the do block.
ABG
July 22, 2020, 2:22pm
6
Just because something works does not make it right.
It has to be simple enough to prove that it is right.
Here is my simplification ...
Math_reminder_ABg.aia (920.2 KB)
The notAlreadyHandled test for button clicks is necessary to allow you to add a separate Click event block for the bottom button, which must be handled differently from the shape buttons.
Can you please tell the functionality of notAlreadyHandled
in simple terms ?
I am sorry for late response
ABG
July 23, 2020, 9:05pm
8
It makes it possible to mix generic and non-generic event handlers.
How do you plan to handle that 4th button of yours?
It is not associated with a switch.
It needs its own Click event.
What happens if you click that 4th button without its own Click event block?
Try it.
system
Closed
August 1, 2020, 6:43am
10
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.