[Gambas-user] Default properties

gen braga genbraga1 at gmail.com
Sat May 18 17:19:23 CEST 2019


Hi there,

I remember back in VB times, the Form controls had their so called
default properties. So:

lblLabel1.Caption="Hello world"
iValue = scrVScroll.Value

could simply be:

lblLabel1 = "Hello world"
iValue = scrVScroll

AFIK we dont have this in Gambas and I think it would be nice. Besides
someone could say it's just lazyness, I dont think so, althought I
almost never did it this way.

And, beyond that, I think we could also set which property would be
the default one in a property declaration with a switch, like

"PROPERTY [ READ ] [DEFAULT] Identifier [ , Synonymous1 [ ,
Synonymous2 ... ] ] AS Datatype"

Of course I can be wrong...

-
Gen


More information about the User mailing list