[Gambas-user] Where is the list of variables and prefix for them

Benoît Minisini g4mba5 at gmail.com
Thu Dec 16 13:39:41 CET 2021


Le 16/12/2021 à 09:46, Gianluigi a écrit :
> 
> 
> 
> Il giorno gio 16 dic 2021 alle ore 02:26 Martin Belmonte 
> <mbelmonte at belmotek.net <mailto:mbelmonte at belmotek.net>> ha scritto:
> 
> 
>     I think is better work only in variables, not in controls (I try to do
>     in the past)
>     Regards.
> 
> 
> On this I disagree.
> Perhaps I explained myself wrongly, I do not intend to create a single 
> prefix for ... Box, ... View, ... Chooser, but suggest an easy method to 
> memorize.
> With the names of compound controls, it would seem more logical to give 
> the first part two characters and only one to the second.
> Currently it is done, in general on the contrary, but for the boxes 3 
> characters are given to the first part and various other inconsistencies.
> 
> @Benoit
> 
> stop me immediately if you do not agree, and I will just copy what 
> you've already done.
> 
> Regards
> Gianluigi
> 

The three characters prefix for controls comes from VB. They are not 
very coherent, because what is important is mainly detecting at first 
sight that a symbol is a control reference, as these symbols are 
declared automatically.

So you see the three initial letters of the symbols in lowercase, and 
you know that it is a global variable pointing at a control created in 
the form editor.

Then, in second, I use the three letters to tell that the control is an 
text-related field (TextBox, TextArea, Label, TextLabel) editable or not 
('lbl' <-> 'txt'), a button, a picture, a treeview... All that being 
mainly for basic controls.

For compound or really complex controls, the three letters are not 
really important.

Regards,

-- 
Benoît Minisini


More information about the User mailing list