[Gambas-user] Release 3.3.1, gtk ColourChooser is somewhat broken

RICHARD WALKER richard.j.walker at ...247...
Tue Oct 2 02:50:27 CEST 2012


> You must ensure that:
>
> - It is correctly indented.

OK there I think. Everything is appropriately indented. The size of
the indent is tweakable in the editor preferences. I set it to 4
spaces as I am used to that.

>
> - Variable, functions... have good names.

All of the functions (apart from three procedures) are event handlers
of one sort or another but within those constraints they are quite
well named

> Following the convention of the IDE source code is a must.

I have loaded gambas3 into the IDE to have a look at the code. From a
quick scan it looks like there is a definite "style" with variable
names where "noise" characters are prepended to add
language-implementation-specific meaning.

I have seen this in other Gambas programs and I think I could write
some code to mangle the names in my program appropriately but I think
I will need a table of codes and their meanings. There does not appear
to be a one-to-one relationship between Gambas types and letter
prefixes, though I cannot be sure without checking more code. My best
guess so far is :

a = array of any type
b = boolean
c = container ?
h = several different things, mostly Objects
i = integer, short, byte
s = string
$ = can be added in front of one of the above to signify ... ?

Use of these prefixes would also appear to imply that all variable
names (the real part) must start with a capital letter.

Is there a reference page for this somewhere? I'll have a look tomorrow.

>
> - It is english (some examples are not in english, but this is not a
> good idea).
>

Phew! That's a relief. I can even provide a translation for American:-)

> When I will check that the way of doing things is right. I mean, if it
> is an example of what to do, it should do things right. Or it will be an
> example of what not to do.

Damn! That's the end of that then :-( Seriously though, I reckon that
one is the killer. Although the program is quite small there are one
or two places where I couldn't determine the "right" way to get
something done, and research didn't help, so I just kept modifying my
code until it would work, or I gave up and went another way.

Or put it another way, on reflection I would be too embarrassed to
have the father of Gambas read my effort. I might have a go at
something simpler which merely uses the font and colour choosers - I
don't think they have been featured yet.

Richard




More information about the User mailing list