Crowdsourced GUI. Open beta testing. - page 29

 
Alexandr Andreev:

Well, there was a half example. It is clear that there is some file as a piece of a working function. Where the switch (buttons) is generated and we have a possibility to write reactions to button presses.

Yes, this is a semi-example. Couldn't make it to the end because of that bug with positions.

Reactions can be made to buttons, checkboxes, input boxes, sliders, dropdowns, radio button groups.

For now, the editor allows you to create these elements. Event handlers are created in the file for them, in which the user prescribes the reactions.

Also, functions are printed in the file through which the user accesses the elements to:

1. Obtain the current value of the element.
2. Set a new value to the element.

The functions are easily selected from a list of intellisense that responds to prefixes E_ (elements) and W_ (windows).

There will be a full example in the evening.
 
In general, the release on the implementation of the button response is quite viable. It's just the design that needs some work.
 
Реter Konow:
Yes, this is a half-example. Could not make it to the end because of that bug with the positions.

Reactions can be inscribed on buttons, checkboxes, input fields, sliders, drop-down lists, radio button groups.

For now, the editor allows you to create these elements. Event handlers are created in the file for them, in which the user prescribes the reactions.

Also, functions are printed in the file, through which the user accesses the elements to:

1. Get the current value of the element.
2. Set a new value to the element.

The functions are easily selected from an intellisense list responding to prefixes E_ (elements) and W_(windows).

There will be a full example in the evening.

Err what other functions to select... there is no need to do any of these. Generate a file in which, as I understand it, valid buttons are assigned to the switch.That's it. Full stop. From here it is up to everyone to call their reactions to this button. For example to save that it was pressed or something. The environment for the feedback of pressing I think unnecessary.

 
Alexandr Andreev:

Err, what other features to choose... There's no need for any of that. Generate a file in which, as I understand it, you assign valid buttons to the switch. That's it. Full stop. From here it is up to everyone to call their reactions to this button. For example to save that it was pressed or something. The environment for the feedback of pressedness I think unnecessary.

It is better to work on the design

 
Alexandr Andreev:

Err, what other features to choose... There's no need for any of that. Generate a file in which, as I understand it, you assign valid buttons to the switch. That's it. Full stop. From here it is up to everyone to call their reactions to this button. For example, to save that it was pressed or something. The environment for click feedback I think it is unnecessary.

And here we'd better implement the environment through classes. Also calling the tabs menu, etc. etc.

 
Alexandr Andreev:

Err, what other features to choose... There's no need for any of that. Generate a file in which, as I understand it, you assign valid buttons to the switch. That's it. Full stop. From here it is up to everyone to call their reactions to this button. For example to save that it was pressed or something. I think that the environment for feedback is unnecessary.

You don't get it.

1. We should enter the reactions into the handler, right.

2. If we want to get current value from element (for example, textof input field) we call its function from ready list.
 
Alexandr Andreev:

And the environment should be implemented through classes. Also tab menu calls and so on and so forth.

Let's not wave the expression "we need classes" in front of Peter's nose. Let's just wait for video at least, then we'll ask questions.

I've already suggested Peter to modify his "kernel" with a very simple variant: use structures. The hell with these classes, if a person doesn't want to dive into them - that's his own business.

But using structures would simply make life easier for Peter himself.

What the "core", aka global array, looks like now: a multidimensional array, well at least two-dimensional. The second dimension contains properties of a certain control type by indexes. Properties can be accessed by name as well, since indexes are replaced by defines and we get a "pseudo reference" by name. In fact, everything is built on defines, like that "markup language" in Peter's code.

I've already suggested that Peter should implement a structure, so the global array could be made one-dimensional and the properties could be referred to directly by name. Core building would be simplified too, because it would be enough to add new props to the original structure and further refer to them by name. And the code itself could be shortened by removing the listing of numerous defines and methods to use them.

On the one hand it's not a class, but on the other hand it would make handling the global array much easier for Peter. Besides, Peter already has some experience in working with a similar structure: a union.

But Peter has his own way of sensei and we will just wait for the result...

 

I would propose the following scheme as a cross-cutting example: Create a form with three fields: trade amount, price SL and price TP, two buttons: BUY and SELL

Create Expert Advisor, connect GUI as an inluder. Add a variable for the initial bid. When initialized, initial bid amount is passed to the appropriate field in the GUI.

Create in the Expert Advisor function "Open Deal". This function should be called as soon as one of the buttons in the GUI is clicked.

In the function itself we "find out" which command was given and also ask the GUI what rate is set now and on the basis of these data we open the corresponding deal.

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

I would propose the following scheme as a cross-cutting example: Create a form with three fields: trade amount, price SL and price TP, two buttons: BUY and SELL

Create Expert Advisor, connect GUI as an inluder. Add a variable for the initial bid. When initialized, initial bid amount is passed to the appropriate field in the GUI.

Create in the Expert Advisor function "Open Deal". This function should be called as soon as one of the buttons in the GUI is clicked.

In the function itself we "find out" which command was given and also ask the GUI what rate is set now and on the basis of these data we open the corresponding deal.

Lot, take and stop + buy/sell buttons? Simple and clear example. I will do so. I will add functions to open orders and get stop prices.
 
Реter Konow:
You don't get it.

1. Write the reactions in the handler, right.

2. If we want to get the current value from an element (e.g.input field text) we call its function from the ready list.

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