Can't make xmlconfig work... lazarus / 8-Other ---------------------------------------------------------------------- tortho · 2006-03-02 19:07 Hi all, If anyone can have a look at the following, and give me some advice.. i'm a newbie programmer :-) Line cfg := TXMLConfig.create('myconfig.xml'); in the following example gives me this error when i try to run it in Lazarus 0.9.12 under Windows XP SP2 Please ignore the line numbers, as the example is cut & pasted. Unit1.pas(43,41) Error: Incompatible type for arg no. 1: Got "AnsiString", expected "TComponent" The following text is from the "Using XML for configuration files" Written by Thomas Zastrow. procedure TForm1.Button1Click(Sender: TObject); var cfg: TXMLConfig;     s:string; begin  cfg := TXMLConfig.create('myconfig.xml');  cfg.SetValue(KeyName2write.text, Value2write.text);  cfg.free;  Messages.caption := 'Key/value was saved!'; end; ---------------------------------------------------------------------- tech-pro · 2006-03-03 10:09 You should be doing:  cfg := TXMLConfig.create(Self);  cfg.Filename := 'myconfig.xml';