Quantcast
Channel: Delphi – The Wiert Corner – irregular stream of stuff
Browsing all 1445 articles
Browse latest View live

delphi – Can I use an Edit Mask to format output? (not just validate input) –...

From a while ago, and – being on the back-end side mostly – I sometimes forget: [WayBack] delphi – Can I use an Edit Mask to format output? (not just validate input) – Stack Overflow You can use the...

View Article


Optional sort by name in `LogMemoryManagerStateToFile` · Issue #64 ·...

If not done yet, try to improve this: [WayBack] Optional sort by name in LogMemoryManagerStateToFile · Issue #64 · pleriche/FastMM4 · GitHub –jeroen

View Article


Image may be NSFW.
Clik here to view.

Spring4D Mock – Delphi Unit Testing : Writing a simple spy for the CUT –...

Reminder to self: write a longer article on Delphi mocking as Spring4D mocking is much better than Delphi Mocks, especially because of code-completion reasons. Spring4D has a Mock record that can...

View Article

FastMM PushAllocationGroup

Few people seem to know about the FastMM PushAllocationGroup method. This search returned almost nothing: fastmm PushAllocationGroup -site:github.com -site:sourceforge.net -site:stackoverflow.com –...

View Article

Learned about the {$EXTENSION zzz} or {$E zzz} Delphi directive: {$EXTENSION...

I totally missed that this has been added in Delphi a long time ago (at least in Delphi 2007 or maybe even before): the {$EXTENSION zzz} or {$E zzz} Delphi directive that sets the file extension of the...

View Article


Since Delphi still does not include a TDateTimeHelper: use the one by colini...

These are quite OK: [WayBack] GitHub – colinj/TDateTimeHelper: Helper record for TDateTime type in [WayBack] DateTimeHelper.pas with DUnitX tests in [WayBack] TDateTimeHelper.Tests.pas. Via: [WayBack]...

View Article

Pointers are dangerous – twm’s blog

TL;DR Do not keep pointers to objects in memory that can be relocated. SetLength can relocate the memory [WayBack] Pointers are dangerous – twm’s blog Via: [WayBack] Pointers can be really helpful,...

View Article

Register and use a custom clipboard format in Delphi – twm’s blog

Cool post: [WayBack] Register and use a custom clipboard format in Delphi – twm’s blog. It is about transmitting GPS (WGS 84) coordinates from one program to another via the clipboard. One day I will...

View Article


Be careful changing the DataContext of a TRemotable

Still not sure why the RTL code is like this: procedure TRemotable.SetDataContext(Value: TDataContext); begin if (RemotableDataContext <> nil) and (RemotableDataContext = Self.DataContext) then...

View Article


Image may be NSFW.
Clik here to view.

Tracking down Delphi “abstract error” occassions.

A few tips. Set breakpoints in these units: System.pas: procedure _AbstractError; begin if Assigned(AbstractErrorProc) then AbstractErrorProc; RunErrorAt(210, ReturnAddress); end; System.SysUtils.pas:...

View Article

delphi – What are the list of all possible values for DVCLAL? – Stack Overflow

From a while ago, from notes even longer ago – around 1994 on DVCLAL the Delphi VCL Access License code which is actually a checking logic for determining the SKU (stock keeping unit) or Delphi...

View Article

Delphi: `procedure RaiseAbstractError(const aClass: TClass; const...

Needs the System.SysConst unit: procedure RaiseAbstractError(const aClass: TClass; const aMethodName: string); begin   // more explanatory than AbstractErrorProc();   raise...

View Article

The Delphi Geek: Using Generics to Manipulate Enumerated Types

Not that this is bad code, but there are no unit tests for them, and I have seen places in the wild that blindly use it without documenting where it came from and what tested alternatives might be:...

View Article


Do not make methods protected unless you want them to be visible as public

One of the protection levels in Delphi is protected. Originally meant for the class itself, that level is also visible to “friends”: anything in the same unit, for example: unit BusinessLogicUnit;...

View Article

Image may be NSFW.
Clik here to view.

A bunch of Spring4D dependency injection container related questions

Since G+ is down, a lot of interesting questions have vanished. Luckily I saved some by [WayBack] Jacek Laskowski – Google+ related to Spring4D and dependency injection: [WayBack] Spring4D IoC and...

View Article


Delphi: why breakpoints from time to time are not usable (green highlighted...

I still have not figured out the circumstances, but ever since either the Unicode Delphi versions (2009 and up) or BDS (8 and up), I have this every now and then: [WayBack] Delphi: why breakpoints from...

View Article

Delphi revelations #3 – kbmMW Smart client – DispInvoke leak –...

For my archive, as one day I will run into this Variant/DispInvoke issue myself:[WayBack] Delphi revelations #3 – kbmMW Smart client – DispInvoke leak – Components4Developers: Delphi revelations, now...

View Article


Delphi Compiler Intrinsics can help you collapse generated code for generics...

On my reading list [WayBack] Delphi Corner Weblog: The current state of generics in Delphi because it explains in more detail why Delphi compiler generic type based intrinsics introduced some 5 years...

View Article

Delphi spring collections

[WayBack] Spring Collections I have a list of elements, there are, for example, 100 of them. List : IList; I want to get 5 values greater than 10 and … – Jacek Laskowski – Google+ Q I have a list of...

View Article

Image may be NSFW.
Clik here to view.

I’m using Delphi XE 10.2: empty documentation tab means you need to update to...

If you see the Documentation tab like below you need to either: install the[WayBack] 10.2.2 Welcome Page and Documentation Hotfix – Community Blogs – Embarcadero Community update to 10.2.3 manually fix...

View Article
Browsing all 1445 articles
Browse latest View live