A task with buttons ! - page 5

 
Dmitry Fedoseev:
Where is all this done? In ontic by ticks function, or in ontimer, or where? Where do you callObjectGetInteger(), to know which button is press ed?


Remember the previous state of the buttons, then you will know which button has just been pressed and which was pressed a long time ago.

I.e. by time? And where do you save this time? Into variables for each button? That is not an option.
 
Vladimir Pastushak:
You mean by time ? And where do I save this time ? In variables for each button? This is not an option.

No, not time, but condition. What's not an option? Create variables for the buttons? Why not? Without additional variables (and preferably an array) the problem is not solvable.

 
Dmitry Fedoseev:

No, not time, but condition. What is not an option? Create variables for the buttons? Why not? The problem cannot be solved without additional variables (or, better, an array).

It can be solved without cumbersome constructs... I already wrote about state. You must not have encountered this problem and can't see what it is...

Try to draw 2-3 buttons and at pressing one to disable the other ... It only seems that everything is simple ...

 
Vladimir Pastushak:

It can be solved without cumbersome construction ... I've already written about the condition, you probably have not faced a similar problem and do not see what the problem is ...

Try to draw 2-3 buttons and when you press one disable the other ... It only seems simple ...

Not so much. I don't see the problem here at all. Elementary, even 300 buttons. I've explained how to do it. Create an array and store the states of the buttons in it. As the state of the button doesn't match the state in the array, it means it is pressed by a person.
 
I also think you get a kick out of sticking it out. It's like I have this incredible problem that no one can even understand, and how unique and awesome I am because of it. It's a 2x2=4 problem.
 
Dmitry Fedoseev:
That's a bit of a problem. I don't see the problem here at all. It's elementary, even 300 buttons. I have explained how to do it. Create an array and store the states of the buttons in it. As the state of the button doesn't match the state in the array, it means that it is pressed by a person.

OK !

Array of 100 buttons pressed, button number 50 is pressed and the other 99 are pushed to the pressed state.

The user presses the button number 53. The Expert Advisor goes through the code from the beginning, reaches button number 50 and pushes button number 53 ... So, what the user clicked had no effect ...

 

Four pages trying to ask one question:

Where is this all done? In the ontic by tick function, or in the ontimer, or where? Where do you callObjectGetInteger() to know ifa button is pressed?

 
Dmitry Fedoseev:
I also think you get a kick out of sticking it out. It's like I have this incredible problem that no one can even understand, and how unique and awesome I am because of it. It's a 2x2=4 problem.
When it seems to be necessary to be baptized, I'm looking for a solution to a particular problem, if it is 2x2 then your version in the studio ...
 
Vladimir Pastushak:

OK !

An array of 100 buttons is pressed, button number 50 is pressed and the remaining 99 are pressed.

The user presses button number 53. Counsellor goes through the code from the beginning, reaches button number 50 and presses button number 53 ... So what the user clicked had no effect ...

Having reached 50 there will be no pushback because this pushing has already been fixed in the array. Button 50 is pressed and the array says pressed. At 53, on the other hand, the button is pressed and the array says pressed.
 
Vladimir Pastushak:
When it seems to cross my mind, I'm looking for a Solution to a particular problem, if it's 2x2 then your option in the studio ...
It's already been in the studio five times.