Another way to add the RTTI information is by using the $M compiler directive.
Taken from the Delphi 7 help file:
A class cannot have published members unless it is compiled in the {$M+} state or descends from a class compiled in the {$M+} state. Most classes with published members derive from TPersistent, which is compiled in the {$M+} state, so it is seldom necessary to use the $M directive.
Example:
unit uSomeObject;
interface
uses
Classes;
{M+}
type
TSomeObject = class(TObject)
private
FCaption;
{ Private Declarations }
protected
procedure SetCaption(AValue: string);
function GetCaption: string;
{ ProtectedDeclarations }
public
{ Public Declarations }
published
property Caption: string read GetCaption write SetCaption;
{ Published Declarations }
end;
For more information see the topic "Published members" in the Delphi 7 help file.