[lazarus] CustomFormEditor
Stefan Hille
stoppok at osibisa.ms.sub.org
Mon Nov 20 16:57:18 EST 2000
On Sat, Nov 18, 2000 at 09:10:31PM -0600, Shane Miller wrote:
> OK, I added more code for the customformeditor. I added some code in customformeditor.pp for the class TComponentInterface. The problem is I don't know what the hell I am doing when it comes to getting typeinfo and calling GetPropInfo or stuff like that.
>
> Can anyone help me? The TComponentInterface has functions like GetPropvaluebyname but I'm not sure how to go about doing that.
>
> Any help?
>
> Thanks
> Shane
The only thing I did so far with RTTI is a small example of how to query
an object. Simply assign this snippet as a callback to a button or so:
procedure TForm1.Button7Click(Sender : TObject);
var
props : TPropList;
pprops : PPropList;
i : integer;
Begin
pprops := @props;
GetPropInfos (Sender.ClassInfo, pprops);
i := Low (props);
while assigned (props[i]) and (i < high (props)) do
begin
writeln (props[i]^.name);
inc (i);
end;
end;
Hope this helps,
Stefan
--
---------------------------------------------------------
Stefan Hille email: stoppok at osibisa.ms.sub.org
48155 Muenster voice: 0251/664695
More information about the Lazarus
mailing list