Crowdsourced GUI. Open beta testing. - page 30

 
Alexandr Andreev:

Why, it is also implementable through a function that is called when the field is filled and the input value is of the template type... everything. Even if it's like string.... there will still be no high speed filling of the field

It's not just about the input field. For example, you want to get the current value of a checkbox - check whether it is checked or not.
Or, find out which item in the checkout list is selected.
Or, find out what mark the slider knob is on.
Or, what value the progress bar has.
And so on.
Calling the function elements not only allows you to get their value at any time, but also to set a new value.
You can also set the colour, status (pressed, pressed, locked). A single element function call allows any of these actions, at any point in user code.
 
Реter Konow:
It's not just about the input field. For example, you need to get the current value of a checkbox - check whether it's checked or not.
Or, find out which item in the pop-up list is selected.
Or, find out what mark the slider knob is on.
Or, what value the progress bar has.
And so on.
Calling element functions allows you not only to retrieve their value at any time, but also to set a new value.
Or, colour, state (pressed, depressed, locked). A single element function call allows any of these actions at any point in the user code.

All this is easy also through a function call on the fact of setting. and further the work of the programmer.


Regarding environment, I would like to see a certain set of calling standards (without changing function name - because I don't know in which piece of code I may need this or that function) on all kinds of bookmarks and windows. window selection preferably through Select. As well as style selection by changing colour on hovering.

I.e., you have to create one menu prototype and use it to create another one. If we were to use environment...

Here, meta-quotes sometimes have some misalignment in some code fragments.

Here, it is desirable to add an additional dynamic interface that appears when you click/hover.... And that's a super small part of it.

 
Реter Konow:
It's not just about the input box. For example, you want to get the current value of the checkbox - check if the checkbox is checked or not.
Or, find out which item in the pop-up list is selected.
Or, find out what mark the slider knob is on.
Or, what value the progress bar has.
And so on.
Calling element functions allows you not only to retrieve their value at any time, but also to set a new value.
Or, colour, state (pressed, depressed, locked). A single element function call allows any of these actions at any point in the user code.

But besides that there is such a notion asCallback-functions, which generate events when something is changed. For example there is a checkbox on the form and we need to know when its state changes. Option 1: make queries to GUI at regular intervals to get this box value, and if the value is different then the box has changed. In this case, some resources are wasted on constant periodic polling - it's not cost-effective.

To avoid wasting resources we have invented so called piggyback functions which give us a notification when control value has changed. For example, when we clicked a checkbox it causes its state to change, and as soon as the state changes an event is generated with type, name and value of the control. And in the subscription to this event will already execute the code needed to wait for the value of the checkbox to change. This is called the event model.

 
Alexandr Andreev:

all this is also easy through a function call on the fact of setting. and then the programmer's work.


Regarding environment, I would like to see a certain set of standards for calling (without changing function name, because I don't know in which piece of code I may need this or that function) on all kinds of tabs and windows. As well as style selection by changing colour on hovering.

I.e., you have to create one menu prototype and use it to create another one. If we were to use environment...

Here, metaquotes sometimes break ends in some code fragments.

here, it is desirable to change the additional interface that appears when you click/hover.... And that's a super-small part.

OK. In a few hours I'll put up a simple example proposed by Alexey. It will be much clearer than the first example.
 
Алексей Барбашин:

There is also such a notion asCallback-functions, which generate events when something changes. For example there is a checkbox on the form and we need to know when its state will change. Option 1: make queries to GUI at regular intervals to get this box value, and if the value is different then the box has changed. In this case, some resources are wasted on constant periodic polling - it's not cost-effective.

To avoid wasting resources we have invented so called piggyback functions which give a notification when control value has changed. For example, when you click on a checkbox it is followed by change of its state, as soon as the state has changed the event with type, name and value of the control is generated. And in the subscription to this event will already execute the code needed to wait for the value of the checkbox to change. This is called the event model.

Well, Alexey, you're talking about an external GUI, polled by the EA via a timer, from old memory. At that time, you needed callbacks. Now, everything happens within a single EA and instead of the external GUI, there is an internal one. Its own.

That is why the engine is connected by a file. To make the interface native to Expert Advisors.

By the way, it is good that the engine is written in Russian. Can you imagine how many coincidence of variable names could occur between it and the Expert Advisor when connecting ...
 
Реter Konow:
Well, Alexey, you're talking about an external GUI, polled by the EA via a timer, from old memory. Back then, you needed callbacks. Now, everything happens within a single EA and instead of the external GUI, there is an internal one. Its own.

Peter, actually, colbecs are not an "old memory", but a common practice for any interaction, not necessarily related to the GUI, regardless of whether it's external or internal. And it doesn't matter WHERE it happens, the main thing is HOW it happens. Colbeck is not a timer!

Waiting for the video...

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

Peter, actually colbikes are not an "old memory", but a common working practice of any interaction, it doesn't have to be related to GUI, no matter if it's external or internal. And it doesn't matter at all WHERE it happens, the main thing is HOW it happens.

Waiting for the video...

I agree. Only inside one EA we won't need them.
 
Реter Konow:
Well, Alexey, you're talking about an external GUI polled by EA via timer, from old memory. At that time, we needed callbacks. Now, everything happens inside one Expert Advisor and instead of the external GUI, there is an internal one. Its own.

This is why the engine is plugged in with a file. To make the interface native to the Expert Advisor.

It is easier to remember your own variables than to learn someone else's.

The code in general should have a minimum of global variables all implemented by passing memory chunks and processing multiple values at once. It makes sense that ..... .... .... HH tried to cut out words linking to objects directly.

In general, it's easier to use regular colobacks.

 
Alexandr Andreev:

Well, it's easier to remember your own variables than to learn someone else's.

In general, the code should have a minimum of global variables all implemented by passing chunks of memory and processing multiple values at once. It makes sense that ..... .... .... HH tried to cut out words linking to objects directly.

In general, it's easier to use regular colbacks.

PS you still have a lot of design work to do there

 
Реter Konow:
I agree. Only inside one EA we won't need them.

Hmmm... then a simple question: how do I know if the status of the checkbox has changed?

Reason: