Crowdsourced GUI. Open beta testing. - page 32

 
Реter Konow:
The value is passed to the corresponding case of the function. The switch operator is there.

It didn't get any clearer...

 
Алексей Барбашин:

It doesn't get any clearer...

In short, not a function is created to be called, but a ready-made section in the generated file, which will be triggered by the event. It doesn't matter by what miracle.

 
Алексей Барбашин:

It didn't get any clearer...

The OnGuiEvent() function takes values from an element on the event of its modification by the user and sends it to the right case of the right element within itself. There, the user writes a response to this event.
 
Alexandr Andreev:

In short, not a function is created to be called, but a ready-made section in the generated file that will be triggered by the event. It doesn't matter how it works.

Exactly.
 
Реter Konow:
The OnGuiEvent() function takes a value from an element at the event of its modification by the user and sends it to the right case of the right element inside itself. There, the user writes a response to that event.

The function does NOT belong to an element, so I repeat the question: how do I determine from which element the value is derived?

Hopefully the video will cover this question.

 
Алексей Барбашин:

The function does NOT belong to an element, so I repeat the question: how do I determine from which element the value is derived?

I hope this question will be explained in the video.

Yes, there will be a clear piece of code that says it works when this button is pressed.

And these are clear pieces when generated depending on the menu created and the file is created, which clearly separate the buttons (switch). So you can write there your event or not.

 
Alexandr Andreev:

There will be a clear piece of code that says it works when this button is pressed.

And these are clear pieces when generated depending on the menu created and the file is created, which clearly separate the buttons (switch). So you type in your event or not.

This is not supposed to be like this. Peter says that we won't have to get into "kernel" code. If so, there must be some events in the type handlers.

That's why I mentioned the type OnChartEvent. You can pass the event, name of the control and its value to it. In this case, you will not have to "contact" directly with the innards of the GUI.

After all, when building a graphical interface, you always know the name of the control. You can also specify event names in item properties. It is possible to operate with these parameters in the OnChartEvent event.

 
Алексей Барбашин:

The function does NOT belong to an element, so I repeat the question: how do I determine from which element the value is derived?

Hopefully the video will cover this question.

One function takes values from ALL elements and sends them to the right cases within its switch. The video will make it clearer.
 
Алексей Барбашин:

It doesn't have to be that way. Peter states that you don't have to go into the "core" code. And if so, there must be some events in the typical handlers.

That's why I mentioned the type OnChartEvent. You can pass the event, name of the control and its value to it. In this case, you will not have to "contact" directly with the innards of the GUI.

After all, when building a graphical interface, you always know the name of the control. You can also specify event names in item properties. These are the parameters which can be used in the OnChartEvent event.

In this case, you have to know the names of all elements by heart, and everything is already generated in the file

 
Alexandr Andreev:

There will be a clear piece of code that says it works when this button is pressed.

And these clear pieces of code will be generated depending on the menu created and the file is created, which clearly separate the buttons (switch). So you can write there your event or not.

Yeah. Here's the deal.
Reason: