Crowdsourced GUI. Open beta testing. - page 36

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

When you open the editor, I don't understand why you don't immediately "spread" the panel around the edges of the graph, why do they overlap each other? This is of course a small thing in the global flow, but it's something that catches the eye.

Flaw. Initially, the window is not editable. When the first element is transferred to it, it is stretched. The auxiliary markup is enabled and the element property values are sent to the properties window, where they can be edited.

I need the window to be editable right away. Will do.
 
Алексей Барбашин:

The video showed that Peter's ALL is built with global variables.

There is only one alert handling function for the whole program and only the value comes to it.

This single function checks for changes in all available controls in the global array. And the spoilage of this function will grow as the number of elements on the form increases.

Peter says that you won't have to dig into his code: well, that's exactly the mess you'll have to dig into very seriously. This could be easily avoided if on each case Peter generated default event method passing type, name and value of the control. Then the whole thing would be easily handled in the body of the main EA.

Ok. But to rewrite something, we must have a clear idea of organization.

If you have any ideas, please write them. I think the base classes are :

coordinates

styles on all of the events

and a base class of the object itself.

We are talking about the base classes. To be honest, I'm not very good at graphics... But I can program something, but because I've never dealt with graphics, I may miss the structure (organization of the structure) at the first attempt.

 
Реter Konow:
Flaw. Initially, the window is not editable. When the first element is transferred to it, it can be stretched. The auxiliary markup is switched on and the element property values are sent to the properties window, where they can be edited.

The window needs to be editable right away. Will do.

Reread my post, I didn't write about an editable window.

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

Reread my post, I wasn't talking about an editable window.

Because all windows are positioned in the centre the first time they are opened. Rule of thumb.
 
Реter Konow:
Because when you first open it, all the windows are positioned in the centre. Rule.

We're talking about "editor" windows! What rule are you talking about? Open any editor and it has all windows glued to the sides of the editor, even in the same meta-editor...

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

We're talking about "editor" windows! What rule are you talking about? Open any editor and it has all windows glued to the sides of the editor, even in the same meta-editor...

Well, you forgot that it's not a release. I'll do it later.
 

Where is the published code?

Regarding getting and setting values of controls, you need to add simplified functions like this: SetElementValue(element name, value) and GetElementValue(element name).

The same for the properties: SetElementProperty (element name, property, value) and GetElementProperty (element name, property).

The latter functions can be used universally because the "VALUE" property can be passed to get or set a value.

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

Where is the published code?

As for getting and setting values of controls, you need to add simplified functions like SetElementValue(element name, value) and GetElementValue(element name).

The same for the properties: SetElementProperty (element name, property, value) and GetElementProperty (element name, property).

The latter functions can be used universally since the "VALUE" property can be passed to get or set a value.

There is an important information block missing in the connection file.

Here it is:

//---------------------------------------------------------------------------------------------------------------------------+
//                                              PLEASE READ CAREFULLY                                                        |
//---------------------------------------------------------------------------------------------------------------------------+
//-------------------------------------TO GET OR SET VALUE FOR YOUR VARIABLE-------------------------------------------------+
//---------------------------------------------------------------------------------------------------------------------------+
//1. To initialize your variable with this value, type:            variable = ( type of your variable )value;                |
//2. To initialize your variable with some element's value, type:  variable = E_, then, choose element and add ();           |
//---------------------------------------------------------------------------------------------------------------------------+
//---------------------------------------TO GET OR SET VALUE OF THE ELEMENT--------------------------------------------------+
//---------------------------------------------------------------------------------------------------------------------------+
//3. To use value of some element, type:                           E_, then, choose element and add ();                      |
//4. To set new value to some element, type:                       E_, then, choose element and add ( type here new value ); |
//---------------------------------------------------------------------------------------------------------------------------+
//-------------------------------------------TO OPEN OR CLOSE A WINDOW-------------------------------------------------------+
//---------------------------------------------------------------------------------------------------------------------------+
//5. To open your window, type:                                    W_, then, choose window and add ();                       |
//6. To close your window, type:                                   W_, then, choose window and add (close);                  |
//---------------------------------------------------------------------------------------------------------------------------+
//------------------------------------TO CHANGE A COLOR PROPERTY OF THE ELEMENT----------------------------------------------+
//---------------------------------------------------------------------------------------------------------------------------+
//7. To change main color of the element:                          Type E_,then, choose element and add (M_COLOR,your color);|
//8. To change text color of the element:                          Type E_,then, choose element and add (T_COLOR,your color);|
//9. To change frame color of the element:                         Type E_,then, choose element and add (F_COLOR,your color);|
//---------------------------------------------------------------------------------------------------------------------------+
//------------------------------------TO CHANGE READ ONLY PROPERTY OF THE TEXT BOX-------------------------------------------+
//---------------------------------------------------------------------------------------------------------------------------+
//10.To change READ ONLY property of the text box:                 Type E_,then, choose element and add (ONLY_READ,0 or 1);  |
//---------------------------------------------------------------------------------------------------------------------------+
//------------------------------------TO CHANGE A STATE PROPERTY OF THE ELEMENT----------------------------------------------+
//---------------------------------------------------------------------------------------------------------------------------+
//11.You can set 6 possible states of the element:        OFF, ON, LOCKED_OFF, LOCKED_ON, OFF_H, ON_H.                       |
//To set a new state of the element:                    Type E_,then, choose element and add (STATE,one of the states above);|
//---------------------------------------------------------------------------------------------------------------------------+
//***************************************************************************************************************************+
//NOTICE: THE COLOR WILL BE SET FOR THE CURRENT STATE OF THE ELEMENT. IF THE STATE CHANGES, THE COLOR WILL CHANGE.           |
//        IN EACH STATE THE ELEMENT CAN HAVE DIFFERENT MAIN, TEXT AND FRAME COLOR. MAKE SURE TO CONSIDER THE STATE           |
//        OF THE ELEMENT, WHEN YOU CHANGE IT'S MAIN, TEXT OR FRAME COLOR.                                                    | 
//---------------------------------------------------------------------------------------------------------------------------+

It answers the questions about getting element values and other properties.

I'll include it in the api-file. And I'll add examples.

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

Where is the published code?

1. Regarding getting and setting values of controls, you need to add simplified functions like this: SetElementValue(element name, value) and GetElementValue(element name).

The same for properties: SetElementProperty (element name, property, value) and GetElementProperty (element name, property).

The latter functions can be used universally since the "VALUE" property can be passed to get or set a value.

Partially implemented. The programmatic interaction with the elements can be extended. I will think about it.

 
Реter Konow:

Partially implemented. It is possible to extend the software interaction with the elements. I'll think about it.

Strange... you code in your native language, but you write help in English, and then you make invectives against English-speaking clever people.... It's weird...