-
Content Count
2905 -
Joined
-
Last visited
-
Days Won
169
Posts posted by Uwe Raabe
-
-
There are different levels of beta testers...
-
1
-
-
Another approach would be to declare a TMessage descendant that the frame (and probably also any form) subscribes to during creation and unsubscribes from on destruction. Then you can broadcast this message when the language changes.
uses System.Messaging; type TLanguageMessage = class(TMessage<string>); ... procedure TMyFrame.HandleLanguageMessage(const Sender: TObject; const M: TMessage); begin var msg := M as TLanguageMessage; SwitchToLanguage(M.Value); end; ... TMyFrame.Create FLanguageMessageID := TMessageManager.DefaultManager.SubscribeToMessage(TLanguageMessage, HandleLanguageMessage); ... TMyFrame.Destroy TMessageManager.DefaultManager.Unsubscribe(TLanguageMessage, FLanguageMessageID, True); ... NotifyLanguage TMessageManager.DefaultManager.SendMessage(nil, TLanguageMessage.Create('DE'));
-
2
-
-
7 hours ago, Dave Nottage said:Isn't this statement a breach of the NDA?
You mean, that I am part of the beta? That is already known in public IAW Embarcadero: TZipFile Improvements in Delphi 12
-
1
-
-
During the beta I use private forks of the public repositories to store all the changes. On release date the fork is merged into public. I don't distinguish code I may publish or not.
-
1
-
-
AFAIK, the TNT Unicode Components were acquired by TMS a couple of years ago, but they are tagged compatible up to Delphi 10.2 now: TMS Unicode Component Pack - looks like they are just abandoned.
-
3 hours ago, Dave Novo said:I had expected that the Guirunner would save the selected tests prior to the test run started.
You can always tweak the source of DUnitX.Loggers.GUI.VCL.pas to your needs. Currently the code for saving is located in FormClose. Besides extracting it to a dedicated method, it can be inserted at the beginning of RunExecute.
In Contributing.md you find instructions to make your enhancements available for all.
-
2
-
-
1 hour ago, Gord P said:Where as what I want to see is:
Well, the FormatFloat implementation has the E15 hardcoded and even documented:
QuoteIf the section for positive values is empty or if the entire format string is empty, the value is formatted using general floating-point formatting with 15 significant digits, corresponding to a call to FloatToStrF with the ffGeneral format. General floating-point formatting is also used if the value has more than 18 digits to the left of the decimal point and the format string does not specify scientific notation.
-
1
-
-
45 minutes ago, Gord P said:Just tried it but it didn't work. Doesn't change it scientific notation when the numbers are really large.
Well, FormatFloat acts as expected;
for var I := 1 to 10 do Writeln(FormatFloat('', I/10)); for var I := 1 to 10 do Writeln(FormatFloat('', I*Power10(1, 14)));
Output:
Quote0,1
0,2
0,3
0,4
0,5
0,6
0,7
0,8
0,9
1
100000000000000
200000000000000
300000000000000
400000000000000
500000000000000
600000000000000
700000000000000
800000000000000
900000000000000
1E15 -
Have you tried with AxisValueFormat being empty?
-
7 minutes ago, Anders Melander said:And as far as I remember you don't even need a license.
At least that is how I read the license:
Quote2.4. Command Line Compiler. Licensee may install the command line compiler on a separate computer from the Product itself, provided that the sole purpose of doing so is to allow that computer to perform unattended building of applications.
-
When you create a new test project and add one of the units for testing, the project won't compile unless all dependent units can be found. So you need to add the search paths accordingly.
There is nothing wrong with having dependencies in the first place. It just makes picking only one unit from the project into another one a bit difficult. Nevertheless, it is always worth thinking about minimizing dependencies, but not only because of simpler testing.
3 hours ago, Brian Evans said:Is the "not" accurate? Makes no sense at all.
The not seems appropriate, but the term project to be tested should be changed to test project.
-
It depends on the actual sources. I have had projects that just needed a compile with the new version and target, while others lasted several months.
-
4
-
-
That could even be simplified to:
for var btn in [Button1, Button2, Button3, Button4, button5] do btn.Enabled := not btn.Enabled;
-
1
-
-
First of all, keeping the default names for the buttons has never been best practice.
While suggesting to have descriptive names for the buttons, this nevertheless is another way to iterate over any group of buttons:
for var btn in [Button1, Button2, Button3, Button4, Button5] do btn.Enabled := True;
And, no, you can't write [Button1..Button5] here.
-
7
-
-
The order of units with initialization code are better retrieved by the C=ICODE entries instead of the C=CODE ones.
-
1
-
-
Looks like it comes from GExpert.
-
8 hours ago, Eric Grange said:Alternatively is there a way to dump the initialization order of InitUnits so that I can bisect to the problematic initialization using a log ?
AFAIK; the initialization order of units follows the order of the ICODE (Initialization Code-Segment) segments in the Detailed map of segments in the map file.
-
1
-
-
IMHO using inline variables and with together looks somewhat strange.
-
2
-
-
1 hour ago, Lajos Juhász said:Delphi version this requires Delphi 10.3 or newer version (https://docwiki.embarcadero.com/RADStudio/Sydney/en/Inline_Variable_Declaration)
Sydney is 10.4!
-
You may have hard time to find something like that, because IMHO your formatting is not consistent: After then the begin is in the next line, but after else it is not.
It probably boils down to having to write your own formatter.
-
1
-
-
39 minutes ago, Vincent Parrett said:the most annoying part is not having delphi translations for much of what I need.
Which APIs are you looking for?
-
-
The FinalBuilder Action allows to specify a manifest, but it is not (yet) capable to build a new one from scratch. Seems you need to create one by yourself. Thankfully there is an article showing how to do it: https://www.finalbuilder.com/resources/blogs/windows-manifest-files
-
Can you try to replace the ctNone with ctAPPLICATION_JSON?
Memory leak with anonymous methods.
in RTL and Delphi Object Pascal
Posted
When I run that code in a vanilla VCL Forms Application in a ButtonClick event - nothing happens.
Either commenting out the last line or inserting a Sleep(100) before makes the ShowMessage appear.
The problem here is that the anon method captures the variable and not the value. Thus setting the value of TerminateProc to nil has influence of what is passed to TThread.Queue. It heavily depends on the timing of whether the Queue call comes first or the setting to nil.
Seems not to be a valid solution to avoid the leak.