Martin Schreiber wrote:
On Friday 11 August 2006 13.58, Mattias Gaertner wrote:
On Fri, 11 Aug 2006 13:42:49 +0200

Florian Klaempfl <[EMAIL PROTECTED]> wrote:
Mattias Gaertner wrote:
Recently the behaviour of the 'protected' keyword has changed in fpc
2.1.1. Now I wonder how can I fix the code, that depends on this.
Redesign :)
Of FPC? Naaah, too much work. ;)

Of my code: Yes, but how?
Looking at the Delphi sources, I see that Borland has made many such
methods public, which resulted in Code using the VCL the wrong way and
creating VCL version dependent conflicts. I want to avoid this, and the old
protected allowed that. But now I can't find any good alternative.


Agreed, same for MSEide+MSEgui.
In a big GUI system it is not possible to handle all low level stuff in a simple class hierarchy, there must be a way to access protected methods of other instances and classes in other units.

What's the alternative?

To have most of internal procedures public with a comment "for internal use only", I really don't like it, or to have all code in a single file, I don't like it too.
What about "friend units'?

Or something like as it is "solved" in delphi with helper classes (p215).
(Maybe we can also implement the strict version (p168))

http://info.borland.com/techpubs/delphi/Delphi2006/Reference.pdf


Marc
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to