I am trying to write data to storage when the form closes or the application terminates and was NOT successful.
At first I tried from the form module
procedure TForm1.FinalizeObject; begin inherited; SaveData; end;
and
procedure TForm1.FinalizeObject; begin SaveData; inherited; end;
none of these attempts worked, so I fixed my code and tried it from the project block
procedure TApplication.ApplicationClosing; begin SaveData; inherited; end;
and
procedure TApplication.ApplicationClosing; begin inherited; SaveData; end;
I have w3_showmessage as the first line of SaveData and it is never called ever .... so if I can verify that one of these 4 methods is running, I can use one of them
What am I doing wrong? Thanks
source share