[Lazarus] TImage - Getting image properties in 'canvas space'

Alberto Narduzzi albertonarduzzi at yahoo.com
Wed Apr 18 23:58:43 CEST 2012


>> But often (depending on the compiler) the mere declaration
>> of an empty derived class allows to access protected members of the base
>> class.
> What does depending on the compiler mean? The compiler is obviously FPC.
> If it is really true that you can access protected members in that way (like Svens message suggests) I consider this a bug.
> Like Mattias said, protected is of no real use in that case and we can just declare all non private members public.

I guess this must be considered a bug. You can indeed access protected 
members of parent classes, but only from within the (your derived) class 
members themselves, not from the outer world.
At least this I believe to e the meaning of having protected (me and my 
friends only), together with public (everybody) and private (me and only 
me).
Let alone published, there for IDE designers only.

Cheers, A.




More information about the Lazarus mailing list