The user shall not close the app and loose his changes in TRichMemo. So I made a check for changes. Unfortunately this check is triggered if changed and IF NOT as well.
The idea:
OnCreate the file of the last session is loaded by
RichMemoName:=RichEdit_File;
LoadRTFFile(RichMemo_Notizen, RichMemoName);
Saved_RichMemo:=true;
of close, I ask for this "saved_RichMemo".
The problem:
The parameter saved_RichMemo is every close FALSE, although I did not change anything.
So I had a closer look at thie onChange and it reads:
showMessage('I am triggered!!');
Saved_RichMemo:=False;
I did this
- started the app
- NOT TOUCHED my Richmemo
- close the app
I saw the "I am triggered"-message by closing the app.
How can I make my app stop asking stupid questions?
or in other words: If my RichMemo is loaded and not edited, the app shall close without saved-check.
Thanks.