-
Content Count
3524 -
Joined
-
Last visited
-
Days Won
116
Everything posted by Lars Fosdal
-
TServerSocket - TClientSocket Issue - Code from Delphi 7 from 2010
Lars Fosdal replied to mtjmohr's topic in Algorithms, Data Structures and Class Design
@mtjmohr It is possible to lock a thread - but that is usually reserved for threads going wildly off in an non-friendly direction. Simply stop adding comments that are "off-topic" to old threads and start new threads for new topics instead. -
When sorting a “StringList” is very costly
Lars Fosdal replied to dummzeuch's topic in Tips / Blogs / Tutorials / Videos
Quick sort is known to suffer performance-wise on already sorted lists, but with only 100 to 200 elements, that should not be the problem. Other than that, keeping your working data outside UI controls is sound advice. -
I noticed that f.x. Paint.NET has the desired behaviour - and respects the Windows theme. Is it still possible to use something like those old-school "spy" programs to see the window class and attributes of the tool windows, to see if anything stands out - or should we assume that it is all done with custom message responses and/or custom paints? None of these have controls with dropdowns or inputs, though - as those are on the toolbar. Not sure if that is coincidental or a design necessity. It also paints the captions alike when not focused.
-
Well, back to the main windows title color trickeries for you, then 🙂
-
What if you did not have a popup form as such, but instead have a frame floating in front in the form? You could make the frame look like a form, and it would take a little extra work to make it movable - and it would not be possible to position it outside the parent form.
-
Does it really matter for the user if the title bar of the main window is not focused? The meaningfulness of the current focus color behaviour has become increasingly diluted by the Electron apps (and others) that run custom colors that doesn't respect the Theme settings at all - focused or not.
-
It may be that the trick required is to fake the focus color of the main form when the popup is focused, and that the main form is refocused as soon as the mouse goes outside the popup.
-
Ok, that is a challenge. What kind of control is it that gets focused in the popup? Would it be possible to deny the focus event somehow?
-
The Case of Delphi Const String Parameters
Lars Fosdal replied to Mike Torrettinni's topic in RTL and Delphi Object Pascal
Looks like it is a check for passing the same param twice, not necessarily a check for the out param thing. -
My context was: "... have a popup window with some focused control (child window) in it, while keeping application's main window active" Isn't that typically what a tool window does? Win32 doc states for WS_EX_TOOLWINDOW:
-
What about the ToolWindow window style on the popup?
-
The Case of Delphi Const String Parameters
Lars Fosdal replied to Mike Torrettinni's topic in RTL and Delphi Object Pascal
It is not really a bug. The docs for the out parameter clearly state that the out variable contents will be discarded. The problem lies in that there is no warning that the value assigned will be discarded the before of the call, and not in the call. http://docwiki.embarcadero.com/RADStudio/Sydney/en/Parameters_(Delphi)#Out_Parameters -
The Case of Delphi Const String Parameters
Lars Fosdal replied to Mike Torrettinni's topic in RTL and Delphi Object Pascal
Seems that https://tmssoftware.com/site/fixinsight.asp has no warning for this case, either. -
We don't allow direct insert/update/delete SQL in our DB schemas, but always use stored procs to do that. Unit tests ensure that parameterisation to these calls has been done properly.
-
No problem 🙂
-
I use Excel for my overtime balance sheet. I could have written a Delphi app, but Excel and SharePoint is very practical. I can edit the spreadsheet on the PC or on the phone on the go. I wonder, should I make another sheet to track my insomnia? 😛
-
@ioan - Do you have a more descriptive name in the version resource?
-
How do I suppress a Inaccessible from C++ warning?
Lars Fosdal posted a topic in RTL and Delphi Object Pascal
[dcc32 Warning] W1029 Duplicate constructor 'MyClassName.ConstructorName' with identical parameters will be inacessible from C++ {$WARN DUPLICATE_CTOR_DTOR OFF} does not seem to have any effect in Delphi 10.3.1 I know I can add an extra dummy parameter to change the signature - but shouldn't that $WARN thing have worked too? -
Do you expect people to Google it? When asking questions, the quality of the question will affect the quality of the answers.
-
With a Parllel.Pipeline, how can you update the UI in the main thread?
Lars Fosdal replied to Tim Koscielski's topic in OmniThreadLibrary
Using a queue is a healthy principle. -
How to optimize exe loading times
Lars Fosdal replied to a topic in Software Testing and Quality Assurance
Because I'm most likely adding forms to the app and want to keep the uses list changes, but not keep the changes to the auto-creates, which may have seriously modified the startup code. Ideal? No. Pragmatic? Yes. A quick cut&paste. -
At least not at 16x16 or 32x32 and 48x48 resolutions, above that it's often good enough.
-
How to optimize exe loading times
Lars Fosdal replied to a topic in Software Testing and Quality Assurance
True that hand-editing the .dpr file is a chance game. To the point that I sometimes keep the code in a separate comment block so that I can quickly restore what the IDE screwed up. But having two forms auto created isn't the problem in that context. -
You'd be surprised of the amount of SVG icons that can be found. https://www.flaticon.com/
-
How to optimize exe loading times
Lars Fosdal replied to a topic in Software Testing and Quality Assurance
Well, I could create it explicitly, but it would be practically the same code?