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

Alberto Narduzzi albertonarduzzi at yahoo.com
Thu Apr 19 00:04:12 CEST 2012


>> It should be mentioned that class helpers do not solve all problems,
> Not being able to access a member that you should not access is not a problem. It's what visibility in OOP is ment to do. It is by design that you cannot access that member. Having an official way to do this is IMHO bad.
> People will use it. And not just in special situations. They will use it as integral part of their software design and that is not a good idea.

totally agree.

An interface to a class (or its concept, anyway) is there for a reason. 
And you should adhere to. I may also say that if you need to access a 
protected, or private for what is worth, member of a (library...) class, 
then you should revise your code... because either you're using the 
wrong class, or your problem can be solved in a different, possibly more 
elegant, and surely more OO compliant way ;-)

Cheers, A.




More information about the Lazarus mailing list