Myles Penlington asked us:

> I am trying to create a class derived from TObject in the {$M+}
> (RTTI turned on).

> But it does not work? - ClassInfo Fails
> But if I create a class that has the same signature as TPersistent

I have created a class hierarchy based on TInterfacedObject with the RTTI
turned on. All working perfectly, but during the process I found that
there is a catch to the process creating $M+ enabled classes. That is that
the compiler doesn't notice the $M+ directive being added and flag the
unit interface as changed. So any dependant units don't get compiled and
the RTTI information expected in them is extremely messed up.

The best thing I found was to do a complete project build after fiddling
with the RTTI generation and than everything would work cleanly after
that.

Cheers, Max.


---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to