Question about PropSaveFile and PropSaveMain

12 views
Skip to first unread message

Bertrand Jeannet

unread,
Dec 13, 2024, 11:07:28 AM12/13/24
to Rosi Delphi Components
Hi Tomas
In the documentation you write, that PropSaveFile can be placed on DataModule or on MainForm.
So I place my SaveFile on DataModule and SaveMain on MainForm. When I close the app, only an empty INI file has been created and nothing has been written into it.
When I place both SaveFile and SaveMain on my MainForm, everything works as designed. Is that a bug or is the documentation wrong or is the fault on my side ?
Many thanks
Bertrand

Tomas Rosinsky

unread,
Dec 13, 2024, 2:27:29 PM12/13/24
to Rosi Delphi Components
Hello,

it depends on PropSaveEvents used for PropSaveMain and creation order of the form and datamodule.
In your case datamodule should be created before Main form and freed after Main form destroy.

You can also store all setting by custom code if you like to use different moment of storing.

See my ComponentDemo or DBDemo application which uses PropSave components and works as expected.
Or provide source code of your demo application and I will check what is wrong.

I hope it helps
Tomas 

Dne pátek 13. prosince 2024 v 17:07:28 UTC+1 uživatel jean...@gmail.com napsal:
Reply all
Reply to author
Forward
0 new messages