-
Content Count
2750 -
Joined
-
Last visited
-
Days Won
162
Everything posted by Uwe Raabe
-
If Debug-DCUs is not active there will be no blue dots in the Delphi sources.
-
Only when you want to break or step into the Delphi units.
-
Memory leak with anonymous methods.
Uwe Raabe replied to pyscripter's topic in RTL and Delphi Object Pascal
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.- 4 replies
-
- anonymousmethods
- threads
-
(and 1 more)
Tagged with:
-
Call for Delphi 12 Support in OpenSource projects.
Uwe Raabe replied to Tommi Prami's topic in Delphi Third-Party
There are different levels of beta testers... -
Can I set a property within a TFrame for all instances of the frame at run time?
Uwe Raabe replied to XylemFlow's topic in FMX
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')); -
Call for Delphi 12 Support in OpenSource projects.
Uwe Raabe replied to Tommi Prami's topic in Delphi Third-Party
You mean, that I am part of the beta? That is already known in public IAW Embarcadero: TZipFile Improvements in Delphi 12 -
Call for Delphi 12 Support in OpenSource projects.
Uwe Raabe replied to Tommi Prami's topic in Delphi Third-Party
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. -
I need advice on converting a 500k lines 32bit Delphi 7 application to 64bit
Uwe Raabe replied to Yaron's topic in General Help
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. -
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.
-
Well, the FormatFloat implementation has the E15 hardcoded and even documented:
-
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:
-
Have you tried with AxisValueFormat being empty?
-
At least that is how I read the license:
-
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. The not seems appropriate, but the term project to be tested should be changed to test project.
-
I need advice on converting a 500k lines 32bit Delphi 7 application to 64bit
Uwe Raabe replied to Yaron's topic in General Help
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. -
Use of dynamic control names
Uwe Raabe replied to Bart Verbakel's topic in Algorithms, Data Structures and Class Design
That could even be simplified to: for var btn in [Button1, Button2, Button3, Button4, button5] do btn.Enabled := not btn.Enabled; -
Use of dynamic control names
Uwe Raabe replied to Bart Verbakel's topic in Algorithms, Data Structures and Class Design
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. -
Tracking down exception in initialization section ? (RaiseExceptObject)
Uwe Raabe replied to Eric Grange's topic in RTL and Delphi Object Pascal
The order of units with initialization code are better retrieved by the C=ICODE entries instead of the C=CODE ones. -
How to eliminate error when searching for irrelevant file, see error below
Uwe Raabe replied to maths bengtsson's topic in VCL
Looks like it comes from GExpert. -
Tracking down exception in initialization section ? (RaiseExceptObject)
Uwe Raabe replied to Eric Grange's topic in RTL and Delphi Object Pascal
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. -
curl-example for POST works, Delphi code throws an 404
Uwe Raabe replied to philipp.hofmann's topic in Network, Cloud and Web
IMHO using inline variables and with together looks somewhat strange. -
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.
-
Library for modifying windows PE files?
Uwe Raabe replied to Vincent Parrett's topic in General Help
Which APIs are you looking for? -
The corresponding function is Ceil.