On 25/11/2011 07:50, Dimitri Smits wrote:
so you have:
type
TMyObject=class(TObject)
...
constructor Create;
end;
Yes
TMyClass = class of TMyObject; //<-- important I guess
Not important or necessary. I was using TClass from RTL = class of TObject
...
procedure pr
- "Luiz Americo Pereira Camara" schreef:
> On 24/11/2011 19:34, Jonas Maebe wrote:
> > In that case, you did not hit the same problem as the original
> poster (your "I also hit this problem recently" is what triggered my
> response). His problem was that if you call a non-virtual constructor
On 24/11/2011 19:34, Jonas Maebe wrote:
In that case, you did not hit the same problem as the original poster (your "I also
hit this problem recently" is what triggered my response). His problem was that if
you call a non-virtual constructor on a class reference variable, that the constructor i
On 24 Nov 2011, at 23:00, Luiz Americo Pereira Camara wrote:
> On 24/11/2011 08:02, Jonas Maebe wrote:
>>
>> On 24 Nov 2011, at 02:58, Luiz Americo Pereira Camara wrote:
>>
>>> On 23/11/2011 18:48, Jesus Reyes wrote:
where I would expect:
cls class is TFoo
TObj.create
TFoo.c
On 24/11/2011 05:47, Graeme Geldenhuys wrote:
On 2011-11-24 03:58, Luiz Americo Pereira Camara wrote:
possible to get the expected behavior without forcing programmer to
create a virtual constructor by using the new RTTI
What has the "new RTTI" got to do with anything?
Simply define TObj.Creat
On 24/11/2011 08:02, Jonas Maebe wrote:
On 24 Nov 2011, at 02:58, Luiz Americo Pereira Camara wrote:
On 23/11/2011 18:48, Jesus Reyes wrote:
in the following example The output is:
cls class is TFoo
TObj.create
where I would expect:
cls class is TFoo
TObj.create
TFoo.create
I also hit this
On 24 Nov 2011, at 02:58, Luiz Americo Pereira Camara wrote:
On 23/11/2011 18:48, Jesus Reyes wrote:
in the following example The output is:
cls class is TFoo
TObj.create
where I would expect:
cls class is TFoo
TObj.create
TFoo.create
I also hit this problem recently
Found that this is one
On 2011-11-24 03:58, Luiz Americo Pereira Camara wrote:
> possible to get the expected behavior without forcing programmer to
> create a virtual constructor by using the new RTTI
What has the "new RTTI" got to do with anything?
Simply define TObj.Create as virtual, and TFoo.Create as overridden.
On 23/11/2011 18:48, Jesus Reyes wrote:
in the following example The output is:
cls class is TFoo
TObj.create
where I would expect:
cls class is TFoo
TObj.create
TFoo.create
I also hit this problem recently
Found that this is one limitation of fpc. Under newer delphi it's
possible to get the
On 23 Nov 2011, at 22:48, Jesus Reyes wrote:
> in the following example The output is:
> cls class is TFoo
> TObj.create
>
> where I would expect:
> cls class is TFoo
> TObj.create
> TFoo.create
>
> ie the TFoo.constructor is not called, is this normal/expected?
Yes. You have to use a virtual
in the following example The output is:
cls class is TFoo
TObj.create
where I would expect:
cls class is TFoo
TObj.create
TFoo.create
ie the TFoo.constructor is not called, is this normal/expected?, The
documentation does clarify the situation:
http://www.freepascal.org/docs-html/ref/refse31.ht
11 matches
Mail list logo