If you're putting that much effort into doing something the language wasn't designed for, you have to ask yourself two things:
1) Are you using the right language?
2) Why not just accept what the normal is (ie why bother making it case-insensitive)?
Try using variables to make it easier to read eg,
NL:Char;
q:String;
s:string;
NL := chr(13);
s := 'some text';
q := Concat('This is line 1',NL,'This is line 2 with text ',s;
You could define NL as a constant.
Have a form-less unit with a variable
Modal_Open:Integer;
Make each form use that unit and in the OnShow events of each modal window put
inc(Modal_Open);
In the OnClose event put
dec(Modal_Open);
Then if you want to know if any are open, check for Open_Modal = 0
I come across this problem pretty much every other program I write because I always forget, if you define the length of a string (so you can write it to a file) it keeps anything that isn't overwritten.
eg.
Blob:String[15];
Blob := 'I'm saying hi';
Blob := 'Hi';
then write it to a file, would...
My documentation doesn't have any disads, but then again it's not exactly the latest version (Delphi 3). It just says that Application.Terminate does exactly the same as closing the main form.
To close all forms when one is closed just use application.terminate in the OnClose event. Works for me, but it doesn't give you too much control over what happens (or it does and I just don't know).
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.