Hello all,
I am new to Lazarus and free pascal. I am sorry if this was asked before or if it is a stupid question. I have looked around and I can't figure out an aswer to my problem/question. I am trying to use TXMLPropStorage. Maybe I have got the whole idea wrong and I am using the wrong component.
I have created an application that contains a main form and a configuration form. In both i have a TXMLPropStorage control. In the configuration form I have 3 strings that i save. It works perfectly. When i open the configuration form, it displays the saved data and saves the edited strings.
Now to my "problem". In the main form I would like read these string to use them. I am doing this:
procedure TMainWindow.XMLPropStorage1RestoreProperties(Sender: TObject);
begin
IMAPServer:=XMLPropStorage1.StoredValue['IMAPServer'];
IMAPUserName:=XMLPropStorage1.StoredValue['IMAPUserName'];
IMAPPassword:=XMLPropStorage1.StoredValue['IMAPPassword'];
end;
This is exactly the same working code in the config form. But when I run it in the main form... I get empty strings. Is it possible to read the saved strings from the configuration form and in that case how would i do that?
Thank you for your help!
Magnus