> No. It just means the classes are designed wrong.
Very true. There are a number of places in Delphi's VCL where this is
true... for D5 at least.
> If you need to access directly private class fields, I think there are
> serious design flaws in your code.
Class "crackers" only give access to p
On Mon, 14 Aug 2006, Martin Schreiber wrote:
On Sunday 13 August 2006 13.27, Marco van de Voort wrote:
It is ugly, produces warnings and is possibly forbidden in FPC 2.1.1 (I
don't know). A more elegant solution would be to have something like
'friend units' where protected class members are
On Sunday 13 August 2006 13.27, Marco van de Voort wrote:
> > It is ugly, produces warnings and is possibly forbidden in FPC 2.1.1 (I
> > don't know). A more elegant solution would be to have something like
> > 'friend units' where protected class members are visible:
>
> I wonder what the use of m
Marco van de Voort wrote:
It is ugly, produces warnings and is possibly forbidden in FPC 2.1.1 (I don't
know). A more elegant solution would be to have something like 'friend units'
where protected class members are visible:
I wonder what the use of making a private/public/protected distinctio
> It is ugly, produces warnings and is possibly forbidden in FPC 2.1.1 (I don't
> know). A more elegant solution would be to have something like 'friend units'
> where protected class members are visible:
I wonder what the use of making a private/public/protected distinction is in
the first plac
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).
(Ma
Martin Schreiber wrote:
On Friday 11 August 2006 20.35, Marc Weustink wrote:
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'?
On Friday 11 August 2006 20.35, Marc Weustink wrote:
> >> 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'?
>
>
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 cod
On 8/11/06, Mattias Gaertner <[EMAIL PROTECTED]> wrote:
Thanks for the good example. With the protected method you can easily do
dangerous things, like adding an action twice or forgetting to remove it. With
the 'protected' AddAction you could do such things only with dirty tricks like
the abo
On Fri, 11 Aug 2006 15:45:00 +0200
"Graeme Geldenhuys" <[EMAIL PROTECTED]> wrote:
> On 8/11/06, Mattias Gaertner <[EMAIL PROTECTED]> wrote:
> > Where do you read here anything about 'current instance'?
>
> Maybe not in that snippet of text, but I read it somewhere... ;-)
:)
> > And it was ve
On 8/11/06, Mattias Gaertner <[EMAIL PROTECTED]> wrote:
Where do you read here anything about 'current instance'?
Maybe not in that snippet of text, but I read it somewhere... ;-)
And it was very Delphi compatible. I mean, how many Delphians noticed the
difference at all? It didn't hurt an
2006/8/11, Mattias Gaertner <[EMAIL PROTECTED]>:
On Fri, 11 Aug 2006 14:49:16 +0200
"Graeme Geldenhuys" <[EMAIL PROTECTED]> wrote:
> On 8/11/06, Michael Van Canneyt <[EMAIL PROTECTED]> wrote:
> > It seems normal to me that it is not just the current instance. You KNOW
this
> > method is there,
On Fri, 11 Aug 2006 14:49:16 +0200
"Graeme Geldenhuys" <[EMAIL PROTECTED]> wrote:
> On 8/11/06, Michael Van Canneyt <[EMAIL PROTECTED]> wrote:
> > It seems normal to me that it is not just the current instance. You KNOW
> > this
> > method is there, in a descendent, so it seems logical that you
I managed to Copy and Paste the text, for thouse that can't view the
attached image from my previous post...
---
A private member is invisible outside of the unit or program where
its class is declared. In other words, a private method cannot be
called from another module,
On 8/11/06, Michael Van Canneyt <[EMAIL PROTECTED]> wrote:
It seems normal to me that it is not just the current instance. You KNOW this
method is there, in a descendent, so it seems logical that you know that it
exists for another instance as well.
Coming from a Delphi background, I disagree
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
On Fri, 11 Aug 2006, Florian Klaempfl wrote:
Michael Van Canneyt wrote:
On Fri, 11 Aug 2006, Florian Klaempfl 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
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. ;)
Michael Van Canneyt wrote:
On Fri, 11 Aug 2006, Florian Klaempfl 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 :)
I have some base classes, that defines meth
On 11 aug 2006, at 13:35, Mattias Gaertner wrote:
I have some base classes, that defines methods to let derived
classes interact.
These methods should not be accessed directly from the outside, so
they are protected. But this does not work any longer. Of course I
can safely typecast, but f
On Fri, 11 Aug 2006, Florian Klaempfl 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 :)
I have some base classes, that defines methods to let derived classes
i
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 :)
I have some base classes, that defines methods to let derived classes interact.
These methods should not be accessed dire
23 matches
Mail list logo