On Sun, 14 Nov 2010, Frank Church wrote:

Does TObject have all the capabilities of TComponent apart from things like 
streaming and being used from the IDE component palette?

I want to create an object which has all the capabilities like getting and 
setting properties, and I want to know whether I need to
inherit from TObject or from something further down the hierarchy.

If you need published properties (RTTI) then you can descend from TPersistent.

Or, you create a class that descends from TObject, for instance TRTTIObject
and compile it under {$M+}, and derive all your objects from that.


Another aspect is ownership. Does ownership require objects to be derived from 
TComponent?

Yes. Unless you care to re-implement the TComponent behaviour.


Is a TPersistent adequate if manipulating the object from the IDE isn't needed?

Yes.

Last but not the least, is the FreePascal TObject/TComponent system more or 
less the same as Delphi's, or are there some major
differences?

It is the same. At least we try very hard to keep it so :-)

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

Reply via email to