-
Content Count
2771 -
Joined
-
Last visited
-
Days Won
147
Everything posted by Anders Melander
-
Function with just underscore _() seems to be valid
Anders Melander replied to Mike Torrettinni's topic in General Help
No. -
There are a lot of things that can cause this. Probably something you have running on your system. Might even be the debugger. https://devblogs.microsoft.com/oldnewthing/20160616-00/?p=93685 https://devblogs.microsoft.com/oldnewthing/20031001-00/?p=42343
-
Threads in PPL thread pool not returning to idle as expected
Anders Melander replied to GeMeMe's topic in RTL and Delphi Object Pascal
or "more wrong" 🙂 -
I use DevExpress and I'm semi-satisfied with it. Besides the occasional update for new ribbon styles they rarely add new skins and some skins can be a real challenge to use. Many skins have problems with white text on white background with certain parent/child control combinations (or grey text on black background for the dark skins).
-
Threads in PPL thread pool not returning to idle as expected
Anders Melander replied to GeMeMe's topic in RTL and Delphi Object Pascal
It seems you have just reverted the two sections of code to the way they where in Delphi 10.2, but do we know why they were changed in the first place. Your fix might be reintroducing another bug. I've not analyzed the internals of the thread pool but your change, and the rationale behind it, "feels" more correct than the original code. -
const MSG_CLOSE = WM_USER; type TMyForm = class(TForm) private procedure MsgClose(var Msg: TMessage); message MSG_CLOSE; public procedure DoIt; end; procedure TMyForm.MsgClose(var Msg: TMessage); begin Close; end; procedure TMyForm.DoIt; var NextForm: TMyNextForm; begin NextForm := TMyNextForm.Create(Application); // Close deferred PostMessage(Handle, MSG_CLOSE, 0, 0); // Open next form NextForm.Show; // or ShowModal end; If your form is destroyed when it is closed then you can just use TForm.Release instead.
-
Okay. I've never used VCL styles so I have no other suggestions.
-
Assuming you've not already done the obvious and googled "delphi tframe styles", have you made sure that ParentBackground=True on the frame?
-
Don't create dependencies between unrelated forms (or even related ones but that's another matter). It's hard to advise you when I don't know the architecture of your application but let's assume that it's a small application with a main form and the three forms you mentioned. Decide on where the controller role should lie. In a small application this can just be the main form. Make sure the controller knows the state of the different forms it controls. Only open and close forms via the controller. Now it should be a simple job of closing the two other forms if the third is opened. You may need to use postponed close with messages or TForm.Release depending on how the lifetime of your forms are managed.
-
You don't need any components. Just use the COM interface: https://docs.microsoft.com/windows/win32/adsi/active-directory-service-interfaces-adsi I haven't worked with AD but my guess is that you just need to import the relevant type library and work from there (Component > Import Component...): but start by reading the documentation.
-
How to remember units and classes, where is what?
Anders Melander replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
In my work there's rarely a difference. I have a lot of clients where the job boils down to "our code sucks - fix it". The problem is often the complete lack of a framework - or a badly designed one. Yes! In my work process I usually refactor and redesign iteratively, continuously changing stuff toward a distant goal while making sure the new code still works. In the beginning the size of the code and the complexity grows as the solution now contains both the old mess and the new solution. Then at some point it's as if the junk suddenly evaporates and I'm left with amazingly little code. Always a good feeling. -
Unless you expect the unexpected 🙂 No but seriously, my experience is that if your hardware and the drivers are good, then Windows is pretty stable. Bad drivers can really mess Windows up but I guess that's expected. I'm also fairly conservative about what software I allow on the system. No cloud storage (iTunes, GDrive, etc), Chrome or Logitech drivers. The Up Time on my main development workstation is currently 163 days...
-
FastMM5 now released by Pierre le Riche (small background story)
Anders Melander replied to Günther Schoch's topic in Delphi Third-Party
I think it's pretty clear: You need a license per developer, not per end user: -
Read the StackOverflow post David linked to.
-
You shut down Windows? Why? I just suspend. Can't remember when I last did a shutdown. That's one of the advantages of using Windows 7; You don't have to reboot so often due to windows update
-
If you post the madexcept error report here I'm sure we can help you - and you'll learn how to interpret a call stack.
-
Experience/opinions on FastMM5
Anders Melander replied to Leif Uneus's topic in RTL and Delphi Object Pascal
[facepalm] -
Experience/opinions on FastMM5
Anders Melander replied to Leif Uneus's topic in RTL and Delphi Object Pascal
So you're complaining that Pierre has enabled us to use FastMM 5 for free and that there's conditions for this use? I think "thank you" would be more appropriate. -
Experience/opinions on FastMM5
Anders Melander replied to Leif Uneus's topic in RTL and Delphi Object Pascal
https://www.google.com/search?q=GPL+V3 -
FastMM5 now released by Pierre le Riche (small background story)
Anders Melander replied to Günther Schoch's topic in Delphi Third-Party
It's explained in the readme. It would be simpler if you described what you're doing and what your experience is, than us explaining every possible improved scenario. -
Experience/opinions on FastMM5
Anders Melander replied to Leif Uneus's topic in RTL and Delphi Object Pascal
What makes you think it "supports NUMA"? -
Thread programming without sleep or WaitFor events
Anders Melander replied to turkverisoft's topic in Delphi IDE and APIs
Make that multi posted. What an a**. https://www.nldelphi.com/showthread.php?43637-Thread-programming-without-sleep-or-WaitFor-events&s=9c6121658fc40c66ce2abcf948937ab2 https://www.sql.ru/forum/1324939/thread-programming-without-sleep-or-waitfor-events https://www.cyberforum.ru/delphi/thread2630964.html -
Which includes every third party or homegrown component installed. @bazzer747 If you install MadExcept you will get a nice stack trace of the error.
-
Thread programming without sleep or WaitFor events
Anders Melander replied to turkverisoft's topic in Delphi IDE and APIs
It's not really a problem. I have to support Windows 7 since the majority of my customers are still using it. In six to eight months I think Windows 10 will overtake it, but even then I will still have to support Windows 7 for those that use it. I've not yet had any needs beyond what Windows 7 provides so like I said it's not a problem for me or my customers. -
Thread programming without sleep or WaitFor events
Anders Melander replied to turkverisoft's topic in Delphi IDE and APIs
Indeed. Unfortunately it requires Win8 or "better" which means it's out of bounds for me at least.