2007/3/20, Graeme Geldenhuys <[EMAIL PROTECTED]>:
Yeah, as everybody else stated. The Tag property should do the trick for
you.
And, broadly speaking, it is not a good practice modifying an ancestor to
suite these needs. Tag property is good but, for example, if you would need
a string property for your class you can make something similar that is
following and to use TMyObject as ancestor for your classes.
For TComponent you can do the same and create a similar property for your
class. If inheriting is a problem remember that you can always use the
composition.
Slapshot
type
{ TMyObject }
TMyObject = Class(TObject)
private
FMyProperty: string;
procedure SetMyProperty(const AValue: string);
public
property MyProperty: string read FMyProperty write SetMyProperty
end;
implementation
{ TMyObject }
procedure TMyObject.SetMyProperty(const AValue: string);
begin
if FMyProperty=AValue then exit;
FMyProperty:=AValue;
end;
--
Antonio Sanguigni alias slapshot
----------------------------------------------------------------------
GioveLUG (Linux User Group) - http://www.giovelug.org
Edupup (Educational distro) - http://www.edupup.org