Fix + QoL + eye candy for Windows error boxes.
- Run this program on Windows:
{$mode objfpc} {$longstrings on} {$apptype gui}
uses
StrUtils;
begin
write(stderr, DupeString('a', 1019));
write(stderr, ' hello world');
end.
You will get these two messageboxes:
With this patch, they become correct:
- Run this program on Windows:
{$mode objfpc} {$longstrings on} {$apptype gui}
uses
StrUtils;
begin
write(stderr, DupeString('abc ', 2500));
end.
You will get 10 messageboxes one after another. The patch adds “Cancel” button that mutes them for a second.
- Prefer breaking (intermediate) messages at line endings, if there’s a suitable one. Try this program with
-gh: Use heaptrace unit
(heaptrc
with GUI applications is also a well-known real-life case of all of the above):
{$apptype gui}
var
i: int32;
begin
for i := 0 to 499 do GetMem(i);
end.
First and third message (out of... many) before:
After (and again, you can cancel their stream if and when you get bored):
Edited by Rika