[Gambas-user] Overriding Color class

Benoît Minisini g4mba5 at gmail.com
Sun Oct 18 00:55:34 CEST 2020


Le 18/10/2020 à 00:49, Bruce a écrit :
> I have a project that has it's own Color class. It replaces all the 
> native static properties, e.g. Background with read/write properties, so 
> we can set a particular color scheme from a file.
> 
> This has worked since 2017 up to Gambas 3.15.1 without a problem but now 
> I've updated to the latest git version suddenly I get
>      Color.Background is incorrectly overridden in class 'Color'
> Why would this be? I thought local classes had a higher priority in the 
> symbol table than the native ones? There is no inheritance involved it 
> is simply a class that should completely replace the ntive one.
> tia
> bruce
> 

There is actually no "replacement", only inheritance. You must ensure 
that the new Color.Background property is declared the same way as the 
old one.

Regards,

-- 
Benoît Minisini


More information about the User mailing list