Hi all,
I've been using the routines from the TypInfo unit quite regularly, and all of a sudden it's thrown me by refusing to find the properties.
This program by my reckoning should work no problem, but it doesn't, and raises an EPropertyError exception saying that the 'property Blah does not exist'. I'm stumped.
This is the simplest and shortest example to show what I'm trying, but I've tried other property names, reading, writing, integers, etc. None seem to work - yet the rest of my program that is using these routines succesfully, in seemingly exactly the same sort of way.
Help anyone?
I've been using the routines from the TypInfo unit quite regularly, and all of a sudden it's thrown me by refusing to find the properties.
Code:
TBlahObject = class(TObject)
private
FBlah : String;
published
property Blah : String write FBlah;
end;
implementation
uses
TypInfo;
var
b : TBlahObject;
begin
b := TBlahObject.Create;
try
SetStrProp(b, 'Blah', 'hello'); // Exception
finally
b.Free;
end;
end;
This is the simplest and shortest example to show what I'm trying, but I've tried other property names, reading, writing, integers, etc. None seem to work - yet the rest of my program that is using these routines succesfully, in seemingly exactly the same sort of way.
Help anyone?