[Gambas-user] Default properties

Benoît Minisini g4mba5 at gmail.com
Sat May 18 17:33:55 CEST 2019


Le 18/05/2019 à 17:19, gen braga a écrit :
> 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
> 
> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----
> 

I hated that. Saving a few key strokes for unreadable code and a lot of 
possible mistakes.

-- 
Benoît Minisini


More information about the User mailing list