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

Image may be NSFW.
Clik here to view.

Want to use SmartPointers in Delphi? Use the Spring4D one: it is unit tested...

A while ago, there was a nice discussion on smart pointers at [WayBack] Smart Pointers – Generics vrs non-generic implementastion – RTL and Delphi Object Pascal – Delphi-PRAXiS [en]. Conclusion from...

View Article


Named Pipes unit for Delphi | Mick’s Mix

[WayBack] Named Pipes unit for Delphi | Mick’s Mix  by Russell Libby, for which (Apr 7, 2013) Francoise Piette has updated this source code for Delphi XE3 and put it on his website at [WayBack]...

View Article


Debugging a Delphi – Format and Pointers/Hex Values (Memory Overwrite) –...

A long time ago (Delphi XE2 era), David Dubois and I helped out Doug find either the cause or a workaround of a memory overwrite in a 32-bit application. The problem was that a call to Format for a...

View Article

Delphi TVirtualMethodInterceptor like magic: some links of useful stuff made...

I think TVirtualMethodInterceptor is a really nice things added to Delphi XE: it allows you to overwrite virtual methods of a class. Since the documentation from that era cannot be saved in the WayBack...

View Article

GitHub – pierrejean-coudert/delphi-libraries-list: List of Delphi Libraries...

For my link archive: [WayBack] GitHub – pierrejean-coudert/delphi-libraries-list: List of Delphi Libraries and Frameworks –jeroen

View Article


The Indy unit `IdObjs` got removed after Delphi 2007

I came across some very old code that used the IdObjs unit as it was depending on the TIdStringStream type. Digging around, I found the unit has been removed from Indy after the Delphi 2007 era. If you...

View Article

grep for Delphi .dproj file containing copy commands for certain DLLs

I always forget the syntax, so this quick grep helps me finding the lines in Delphi .dproj files that have the right copy statements for getting certain DLLs in the output directory. Those are very...

View Article

If you use an implementation of TNonRefCountInterfacedObject, then document...

There are a few TNonRefCountInterfacedObject (or maybe better named TNonReferenceCountedInterfacedObject) implementations around (see list of links below). They can be used to expose interfaces, but do...

View Article


Delphi debugging tip: keep an eye on a object field of an object that will go...

Every once in a while you want to have a Delphi Watch of a field inside an object (say an object of type TContext), except that the field has no value yet, but eventually will point to another object...

View Article


On my research list: Delphi “Package Cache” subtree

On one of the sites, when having some Delphi package registration issues, the standard measure was to delete the complete Package Cache subtree (like...

View Article

Few remember the ancestry of programming languages

A while ago, I saw this tweet: Assembly has been out for 70 years. Fortran has been out for 62 years. COBOL and Lisp has been out for 60 years. BASIC has been out for 54 years. C has been out for 47...

View Article

Delphi: getting the name of the current unit

If you have a class (like TMyClass) in the current unit, you can get the unit name as follows: inside a method of the class (either instance or class method): call UnitName or UnitScope to get the unit...

View Article

Delphi: fixing “W1030 invalid compiler directive true”

I had a “W1030 invalid compiler directive true” in a project that got ported from Delphi XE3 to a much more modern Delphi version. Luckily I found [WayBack] Porting to XE5 and the “W1030 Invalid...

View Article


jeroenp / wiert.me / Native / Delphi / Apps / Console / DfmTools — Bitbucket

Reminder to self: write some more about the IsBinaryDfmFile and ConvertDfmToText tools in [WayBack] jeroenp / wiert.me / Native / Delphi / Apps / Console / DfmTools — Bitbucket –jeroen

View Article

delphi – Faster DirectoryExists function? – Stack Overflow

From a while back: [WayBack] delphi – Faster DirectoryExists function? – Stack Overflow: Q I use DirectoryExists (const PathName : String); to check if a directory is reachable from a computer or not....

View Article


How do I pretty-print JSON in Delphi? – Stack Overflow

For my archive: the [WayBack] How do I pretty-print JSON in Delphi? – Stack Overflow answer by [WayBack] Bob: If you do not want to use any external library, and you’re using a Delphi XE5 or newer,...

View Article

The Delphi interface reference counting compiler bug that will never get...

A long time ago, I write a question [WayBack] delphi – Should the compiler hint/warn when passing object instances directly as const interface parameters? – Stack Overflow in 2010. It was marked by...

View Article


Image may be NSFW.
Clik here to view.

F2084 Internal Error: MA1263 – no relevant results

I tried searching for F2084 Internal Error: MA1263 – Google Search which happened on a complete up to date Delphi 10.1 Berlin installation. It came from a large unit testing application using...

View Article

Image may be NSFW.
Clik here to view.

The magic “procedure Touch(var …” construct

procedure Touch(var Argument); begin end; I included the above code in my blog a long time ago (2014 in fact: Delphi: always watch the compiler Warnings), but never got around to explain the why and...

View Article

DUnit testing code that should raise a specific exception

A while back, I was writing some code to demonstrate a few inner workings of TInterfacedObject, interface reference counting and mixing object references with interface references. One way to show this...

View Article
Browsing all 1440 articles
Browse latest View live