On 11/02/2016 17:13 μμ, Graeme Geldenhuys wrote:
Hi,
In TPersistent, we have two virtual methods. Assign() which calls
AssignTo().
1) Why are they both virtual? It seems like Assign() is what I call a
template method, farming its work out to other helper methods - in this
case, AssignTo(). Norm
On 2016-02-12 02:17, Dennis wrote:
> Is there any sample codes to copy published properties (via RTTI) ?
> e.g. psuedo code below
Take a look at tiOPF's TtiObject.AssignPublishedProps() method.
https://sourceforge.net/p/tiopf/code/ci/tiopf2/tree/Core/tiObject.pas#l1156
The tiRTTI.pas unit also
Martin Schreiber wrote:
On Friday 12 February 2016 03:17:57 Dennis wrote:
Is there any sample codes to copy published properties (via RTTI) ?
e.g. psuedo code below
for i := 0 to properties.count -1 do begin
case properties[i].type of
vtInteger : properties[i].AsInteger
On Friday 12 February 2016 03:17:57 Dennis wrote:
>
> Is there any sample codes to copy published properties (via RTTI) ?
> e.g. psuedo code below
>
>for i := 0 to properties.count -1 do begin
> case properties[i].type of
> vtInteger : properties[i].AsInteger :=
> Source.Propert
Martin Schreiber wrote:
On Thursday 11 February 2016 17:17:32 Graeme Geldenhuys wrote:
Now the other thing that surprised be, I thought TPersistent.Assign()
automatically handles protected properties (via RTTI) - thinking that
descendants automatically get such functionality for free. But revi
On Thursday 11 February 2016 17:17:32 Graeme Geldenhuys wrote:
>
> Now the other thing that surprised be, I thought TPersistent.Assign()
> automatically handles protected properties (via RTTI) - thinking that
> descendants automatically get such functionality for free. But reviewing
> the RTL code,
On 2016-02-11 15:55, Martin Schreiber wrote:
> It depends on what knows to handle what. Sometimes both have to be overridden.
Thanks Martin and Andreas. So it's more about which direction you want
to go.
Now the other thing that surprised be, I thought TPersistent.Assign()
automatically handles p
On Thursday 11 February 2016 16:13:22 Graeme Geldenhuys wrote:
> Hi,
>
> In TPersistent, we have two virtual methods. Assign() which calls
> AssignTo().
>
> 1) Why are they both virtual? It seems like Assign() is what I call a
> template method, farming its work out to other helper methods - in thi
Am 2016-02-11 16:13, schrieb Graeme Geldenhuys:
Hi,
In TPersistent, we have two virtual methods. Assign() which calls
AssignTo().
1) Why are they both virtual? It seems like Assign() is what I call a
template method, farming its work out to other helper methods - in this
case, AssignTo(). Norma
Hi,
In TPersistent, we have two virtual methods. Assign() which calls
AssignTo().
1) Why are they both virtual? It seems like Assign() is what I call a
template method, farming its work out to other helper methods - in this
case, AssignTo(). Normally template methods are not virtual, but their
he
10 matches
Mail list logo