The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,860 other subscribers

Archive for the ‘Delphi 10 Seattle’ Category

Delphi 10 and up install notes

Posted by jpluimers on 2025/06/18

I try to keep an eye on older Delphi versions as, despite lacking features of newer versions, they do not suffer from issues (hi-dpi, language server, refactoring, stability).

Some notes below.

Tools to always install after Delphi

Install in this order so that GExperts gets the Alt-X menu shortcut and MMX the Alt-M menu shortcut.

  1. GExperts
  2. MMX (Model Maker code eXplorer)
  3. Project Magician
  4. TestInsight

Then download at least these libraries:

Delphi 10 Seattle requires .NET 3.5

You’d think the easiest to install it is through Chocolatey via [Wayback/Archive] Chocolatey Software | Dot Net 3.5 3.5.20160716

choco install dotnet3.5

This fails (Windows 11 is lacking wmic.exe)

The solution in Deploy .NET Framework 3.5 by using Deployment Image Servicing and Management (DISM) | Microsoft Learn still works (and still takes a long time, even on fast hardware with a fast internet connection):

DISM /Online /Enable-Feature /FeatureName:NetFx3 /All

License manager fails to import registration .txt file

It loads the .txt file, but after closing the license manager it is not really imported.

Cause: you renamed the .txt file so that it contains more readable meta-information in the filename.

Solution: put the license file into a directory that has a readme.md file with the meta-information (like computername: that is what the license binds itself to in the online registration wizard).

This brought me an aha moment, as I had encountered it in the past and solved it, but forgot to make a note of it.

So this time, there was no need to follow the steps in either of these:

Delphi 12 still has the same icons for all 3 personalities

Icons in C:\Program Files (x86)\Embarcadero\Studio\23.0\bin\bds.exe

Icons in C:\Program Files (x86)\Embarcadero\Studio\23.0\bin\bds.exe

By now, I had hoped the devteam had finally ensured there were three different icons for the personalicties:

  • Delphi
  • C++ Builder
  • RAD Studio

False hope:

Icons for Delphi 12, C++ Builder 12 and RAD Studio 12: they are all the same.

Icons for Delphi 12, C++ Builder 12 and RAD Studio 12: they are all the same.

And very easy to fix as bds.exe includes all the needed icons and more – see image on the right.

Images:

Delphi 12.1 offline installer bugs not fixed in Delphi 12.2

[Administrator] RAD Studio 12

Java JDK not found on this machine. Please, install Java JDK before.

OK

image

image

If I ever get this to work, I want to use the OpenJDK; some links for that:

This was introduced in Delphi 12.1:

…………………………………………………………………………………………………………………………………………………………………………………

In addition, these Delphi 12.0 installation issues have not been fixed in Delphi 12.2 either (but the C++ Builder path issue seems fixed in the 12.2 Path 1 inline ISO of the off-line installer):

  • [Wayback/Archive] Installation Notes – RAD Studio (12.0 Athens, 20231207)

    Installation performed with Offline Installer results in missing subdirectories

    • Delphi
      When using the offline installer, the Browsing path for Delphi/64bit Linux lacks various directories.
    • C++ Builder
      When using the offline installer, the System include path for C++ / 32-bit Windows is missing the FMX subfolder.

    Note the “64bit” should be spelled “64-bit” and the “C++ / 32-bit” should be spelled “C++/32-bit” to be consistent with “Delphi/64-bit”.

    Similarly, the documentation misses that there is an intermediate node “Language” missing befer you get to either “Delphi” or “C++”, and that the “Compiler” mentioned tab for “C++” does not exist. It is this lack of attention to detail which you see all over the product, including the RTL library source code.

    Also note that these are not just a few “various” subdirectories or just “the FMX subfolder”, and besides in Delphi 12.0, you still have to fix them in Delphi 12.1 and 12.2 directly when you run it the first time after installation:

    • Delphi – add these 42 (FORTY TWO!) directories to the System include path field under Tools > Options > Language > Delphi > Library > 64-bit Linux:

      $(BDS)\source\rtl\common;$(BDS)\source\rtl\sys;$(BDS)\source\rtl\linux;$(BDS)\source\ToolsAPI;$(BDS)\source\IBX;$(BDS)\source\Internet;$(BDS)\source\Property Editors;$(BDS)\source\soap;$(BDS)\source\xml;$(BDS)\source\Indy10\Core;$(BDS)\source\Indy10\system;$(BDS)\source\Indy10\Protocols;$(BDS)\source\fmx;$(BDS)\source\databinding\components;$(BDS)\source\databinding\engine;$(BDS)\source\databinding\graph;$(BDS)\source\data;$(BDS)\source\data\ado;$(BDS)\source\data\cloud;$(BDS)\source\data\datasnap;$(BDS)\source\data\dbx;$(BDS)\source\data\dsnap;$(BDS)\source\data\Test;$(BDS)\source\data\vclctrls;$(BDS)\source\rtl\posix;$(BDS)\source\rtl\posix\linux;$(BDS)\source\data\datasnap\connectors;$(BDS)\source\data\datasnap\proxygen;$(BDS)\source\DataExplorer;$(BDS)\source\Experts;$(BDS)\source\indy\abstraction;$(BDS)\source\indy\implementation;$(BDS)\source\indyimpl;$(BDS)\source\Property Editors\Indy10;$(BDS)\source\soap\wsdlimporter;$(BDS)\source\Visualizers;$(BDS)\source\data\rest;$(BDS)\source\data\firedac;$(BDS)\source\tethering;$(BDS)\source\DUnitX;$(BDS)\source\data\ems;$(BDS)\source\rtl\net

      Likely there is one more directory missing as the Embarcadero documentation page has TWO semicolons here: $(BDS)\source\Visualizers;;$(BDS)\source\data\rest

    • C++ Builder – add these 8 directories to the System include path field under Tools > Options > Language > C++ > Paths and Directories > 32-bit Windows:

      $(BDSINCLUDE);$(BDSINCLUDE)\dinkumware64;$(BDSINCLUDE)\windows\crtl;$(BDSINCLUDE)\windows\sdk;$(BDSINCLUDE)\windows\rtl;$(BDSINCLUDE)\windows\vcl;$(BDSINCLUDE)\windows\fmx;$(BDSCOMMONDIR)\hpp\$(Platform)

  • ………………………………………………………………………………………………………………………

Delphi 12 (and 11) don’t really search for Git/Hg/Svn, but just complain they can’t be found

It does not matter if you use the offline installer or on-line getit installer.

Note I will personally never trust getit: Embarcadero is known for not being able to keep their infrastructure working without long outages, and known for not communicating about infrastructure changes, see for instance:

Their single most stable server is the altd one. Don’t tell them, as it might make them too self confident and start making modifications to it forgetting this lessen: never fiddle with a thing that has been very stable for a very long time.

Upon first start of Delphi 12.2 patch 1 after installation, you get these warning messages:

  • ⚠ Git executable not found
  • ⚠ Hg executable not found
  • ⚠ Subversion folder not found

This despite these being available on the search PATH:

C:\Users\jeroenp>where git.exe
C:\Program Files\Git\cmd\git.exe

C:\Users\jeroenp>where hg.exe
C:\Program Files\Mercurial\hg.exe

C:\Users\jeroenp>where svn.exe
C:\Program Files (x86)\Subversion\bin\svn.exe

Note you have to enter them as full paths to git.exehg.exe and svn-folder (without svn.exe):

C:\Program Files\Git\cmd\git.exe
C:\Program Files\Mercurial\hg.exe
C:\Program Files (x86)\Subversion\bin

Note this has been an issue for Delphi 11 as well, and not responded to in comments it also being present in Delphi 12, see:

Delphi 12.2 inline release cannot be modified after install

A modification (like installing more/less features) requires a full re-install when doing the off-line installer. The steps are referred to by [Wayback/Archive] Adding or Removing Features Using the Offline Installer – RAD Studio:

After you install an initial set of RAD Studio features using the Offline Installer, you can use the installer again to add or remove RAD Studio features.

To add or remove features from your RAD Studio installation:

  1. Run the Offline Installer.
  2. On the Welcome page, check the Modify option and select Next.
  3. On the following pages, configure the features that you want to add or remove from your installation.

Detailed steps are at [WaybackSave/Archive] Using the Offline Installer – RAD Studio are also wrong:

To install RAD Studio using the Offline Installer:
  1. Open the Offline Installer:
    1. Download the ISO image that contains the Offline Installer.
    2. Mount the ISO image in the system where you want to install RAD Studio.
      You can do either of the following to mount the image:
      • Burn the ISO image on a double-layer high-capacity DVD, and put that DVD on the optical disk drive of the target system.
      • Mount the ISO image as a virtual disk with a software solution like WinCDEmu.
    3. Open install_RADStudio.exe in the mounted ISO image to start the Offline Installer.

There is no install_RADStudio.exe any more. The installer .exe filename depends on the Delphi version you install. For Delphi 12.2 inline Patch 1, the offline installer name is radstudio_12_esd_119782a.exe.

I forgot during which Delphi version Embarcadero changed the installer technology, but it has been at least since Delphi 10.4, as reported by Brian Long in [Wayback/Archive] It’s a blong, blong, blong road…: Installer tip.

Note that the online getit installer enables the [Wayback/Archive] Using the Feature Manager – RAD Studio, which is not available when installing using the offline installer..

Links

Some lists of off-line installers are here:

  1. [Wayback/Archive] Pliki instalacyjne RAD Studio (obraz ISO i instalator Webowy) | BSC Polska is way more complete than the below one, but lacks XE3 and 12.2 patch 1 and has the wrong location https://altd.embarcadero.com/download/RADStudioXE/delphicbuilder_xe_3953B_win.iso for XE
  2. [Wayback/Archive] RAD Studio Installation links (ISO and Web installers) – Barnsten.com misses XE3, includes 12.2 patch 1 – which has download issues – and has a link for 12.0 that used to work in the past, but has download issues as well: https://altd.embarcadero.com/download/radstudio/12.0/RADStudio_12_2_i_0329_C2CC.iso fails for 12.2 inline https://altd.embarcadero.com/download/radstudio/12.0/RADStudio_12_0_inline_116924a.iso fails for 12.0 and  https://altd.embarcadero.com/download/RADStudioXE/delphicbuilder_xe_3953B_win.iso for XE
  3. [Wayback/Archive] alfasoft.com/wp-content/uploads/RAD-Studio-Installation-links.pdf [PDF View] misses XE3 and 12.2, has the wrong download link http://altd.embarcadero.com/download/radstudio/10.3/delphicbuilder10_3_0_94364.is for 10.3 (definitely not tested with the .is extension instead of .iso)
  4. [Wayback/Archive] RAD Studio 2010/xe/xe2/xe3/xe4/xe5 official ISO Download address (updated 2013-12-12) has not been updated for a long time, but had a lot of intermediate versions, but has these wrong links: https://altd.embarcadero.com/download/radstudio/xe2/delphicbuilder_xe2_win_dl.iso and https://altd.embarcadero.com/download/RADStudioXE/delphicbuilder_xe_3953_win.iso

Somewhere in the future, I will try to make a complete list as not all of these altd links work. For now, this has to do: [WaybackSave/Archive] altd site:wiert.me – Google Suche

This one for instance didn’t always work (they failed at least from 20241102 until 20241104 downloading way too short files):

Just look at the download sizes and you understand why – his is also why people should publish URL, size and hashes (preferably sha1 or sha256, optionally md5) – filtered on M (mebibyte) sizes – yes, Delphi 7 was that small:

12M  ./altd.embarcadero.com/download/radstudio/12.0/RADStudio_12_2_i_0329_C2CC.iso
22M  ./altd.embarcadero.com/download/radstudio/12.0/RADStudio_12_0_inline_116924a.iso
649M ./altd.embarcadero.com/download/delphi/d7/english/ent/delphi_7_ent_en.iso

I need to check all of the above and especially the two below, which means first finding hashes for them as the sizes match:

https://web.archive.org/web/20240929231113if_/https://altd.embarcadero.com/download/radstudio/12.0/RADStudio_12_0_inline_116924a.iso
https://web.archive.org/web/20241104165704if_/https://altd.embarcadero.com/download/radstudio/12.0/RADStudio_12_2_i_0329_C2CC.iso

Probably the 12.0 one is OK, but the 12.2 inline got truncated to 2 gibibytes:

2.0G ./web.archive.org//web/20241104165704if_/https:/altd.embarcadero.com/download/radstudio/12.0/RADStudio_12_2_i_0329_C2CC.iso
7.1G ./web.archive.org//web/20240929231113if_/https:/altd.embarcadero.com/download/radstudio/12.0/RADStudio_12_0_inline_116924a.iso

I need to check which HTTP header fields in the HTTP request will help alleviate this. Hopefully just a HTTP referer header works fine. A job for somewhere in the future, as I already had obtained copies of these files from someone that already had them downloaded a while ago.

Sizes from:

du -h `find ./altd.embarcadero.com/ | grep iso` | grep M && du -h `find ./web.archive.org/ | grep iso` | grep G

These ones for instance didn’t work at all:

  • https://altd.embarcadero.com/download/radstudio/12.0/RADStudio_12_0_inline_116924a.iso (not available any more)
  • https://altd.embarcadero.com/download/radstudio/xe2/delphicbuilder_xe2_win_dl.iso (missing a build number)
  • https://altd.embarcadero.com/download/RADStudioXE/delphicbuilder_xe_3953_win.iso (missing the b at the end of the build number)
  • https://altd.embarcadero.com/download/RADStudioXE/delphicbuilder_xe_3953B_win.iso (yes, case is important with unix filenames people!)
  • https://altd.codegear.com/download/radstudio2007/CodeGearRADStudio2007_Dec2007.iso (invalid certificate because of the domain name)
  • https://altd.codegear.com/download/radstudio2007/CodeGearRADStudio2007setup.exe (invalid certificate because of the domain name)

These ones do:

This one was missing completely in the first two lists:

Queries:

--jeroen

Posted in Delphi, Delphi 10 Seattle, Development, GetIt, Java, Java Platform, Software Development, Web Development | Tagged: | 1 Comment »

Interface methods are not assignment compatible with method references or methods of object.

Posted by jpluimers on 2019/04/02

Boy I wish that QC was still up and QualityPortal was publicly indexable as that would have saved me quite a bit of time tracking this down. Luckily I got help from Stefan Glienke (who maintains the awesome Spring4D library based on modern Delphi compiler support) when I mentioned

How good are you with reference to function?
I’ve an odd compiler thing throwing errors when using interfaces but not with classes.

So, for posterity:

Unlike C#, in Delphi interface methods are not compatible with method references or methods of object.

This has many manifestations, which means you can get a variety of compiler errors. I’ve listed the ones I could find below, but presume there are more and if I find more will update this post.

These are the errors you can get:

  • E2010 Incompatible types: ‘T’ and ‘Procedure’
  • E2035 Not enough actual parameters
  • E2250 There is no overloaded version of ‘FirstOrDefault’ that can be called with these arguments

These are the (now defunct, but used to be publicly accessible) QC and QualityPortal (needs sign on) entries (thanks Stefan Glienke and Blaise Thorn for reporting these):

The really frustrating part is that the RSP is marked as “new feature” whereas clearly it isn’t, so it probably never will be fixed.

A workaround for now is to wrap the interface method references with:

  • either anonymous methods (when you have just a few classes to cover, but maybe more than a few methods on the interface)
  • or instance methods on a class (when there are many classes to cover and preferably few methods on the interface)

Examples are in the code below that also shows this works fine and dandy in C#.

–jeroen

Read the rest of this entry »

Posted in Delphi, Delphi 10 Seattle, Delphi 10.1 Berlin (BigBen), Delphi 10.2 Tokyo (Godzilla), Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Delphi XE8, Development, Software Development, Spring4D | Leave a Comment »

There can be only MS Office sample automation server wrapper components in RAD Studio

Posted by jpluimers on 2019/02/27

There are six variations; only one can be active at a time:

  • Delphi Office 2000 Servers Package
  • Delphi Office XP Servers Package
  • Delphi Office 2010 Servers Package
  • C++Builder Office 2000 Servers Package
  • C++Builder Office XP Servers Package
  • C++Builder Office 2010 Servers Package

via: I cannot get MS Office sample automation server wrapper components. Neither of… [WayBack]

More in depth article explaining all the nitty gritty details: There Can Only Be One! Handling Different Versions of Design Packages inside the IDE | The Art of Delphi Programming [WayBack]

–jeroen

Posted in Delphi, Delphi 10 Seattle, Delphi 10.1 Berlin (BigBen), Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Delphi XE8, Development, Software Development | Leave a Comment »

“Don’t access VCL from a background thread” – how to demo that?

Posted by jpluimers on 2018/07/11

When accessing the VCL from multiple threads at the same time: adopted from ...\DEMOS\THREADS\THRDDEMO.DPR

When accessing the VCL from multiple threads at the same time: adopted from …\DEMOS\THREADS\THRDDEMO.DPR

Great question a while ago:

[WayBack] “Don’t access VCL from a background thread” – how to demo that? – Primož Gabrijelčič – Google+

For me, the ultimate way why not to access the VCL from a background thread is the precursor of the official threads demo that ships from Delphi 2 to Delphi XE6 in ...DEMOS\THREADS\THRDDEMO.DPR. where you’d think the thread isolation would be in ...DEMOS\THREADS\ThSort.pas but actually is in ...DEMOS\THREADS\SortThds.pas.

The first public showing of that demo did not include main thread protection. It originates from a session at the the 1995 Borland Developers Conference where Ray Konopka showed the below code from Bob Ainsbury.

That session reminded why this joke [WayBack] Via the EKON20 sessions… – Jeroen Wiert Pluimers – Google+ was so funny:  “When Ray Konopka enters the room you have a Raize condition.“.

The question above also made me find back this reference to BorCon95 in San Diego:

Read the rest of this entry »

Posted in Delphi, Delphi 10 Seattle, Delphi 10.1 Berlin (BigBen), Delphi 10.2 Tokyo (Godzilla), Delphi 2, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 3, Delphi 4, Delphi 5, Delphi 6, Delphi 7, Delphi 8, Delphi x64, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Delphi XE8, Development, Software Development | 2 Comments »

I totally forgot that Delphi has had a function to get the current executing thread – Stack Overflow

Posted by jpluimers on 2018/07/05

While updating some old code fiddling with the[WayBackGetThreadId function, I wanted to have some TThread wrapper around it. I had totally forgotten there has been already a means for this since Delphi 2009 (which initially had a bug, but that was worked around at first and fixed later): [WayBackCurrentThread.

The latest version of Delphi, Delphi 2009, has a CurrentThread class property on the TThread class.

This will return the proper Delphi thread object if it’s a native thread. If the thread is an “alien” thread, i.e. created using some other mechanism or on a callback from a third party thread, then it will create a wrapper thread around the thread handle.

20081001 at 5:00 – [WayBackBarry Kelly

Sources

–jeroen

Posted in Delphi, Delphi 10 Seattle, Delphi 10.1 Berlin (BigBen), Delphi 10.2 Tokyo (Godzilla), Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Delphi XE8, Development, QC, Software Development | Leave a Comment »

Delphi, IBX and the Turkish I problem

Posted by jpluimers on 2018/06/13

Last year, it took a while to reproduce and it is likely not fixed anytime soon: if you use Delphi and IBX (InterBase Express) to connect to either InterBase or FireBird database, then in the Turkish locale do not use lowercase SQL in your Delphi code as it will break on the

I’ve decided to put this in a separate post than the one I discovered the issue in as that one focused on the Unicode and language background of the various i/I/ characters and this post on the Delphi part.

So for the non-Delphi part, read Source: Field “id” not found and the The Turkish-İ/I/i/ı and case conversion – Update on the dasBlog Turkish-I bug and a reminder to me on Globalization – Scott Hanselman.

More recently, I learned that the same problem also happens in the Azeri language or Azerbaijani language – Wikipedia via [WayBack] SQL Instance Collation – Language Neutral Required:

uppercase / lowercase mappings (though this only impacts 2 characters — dotted and dotless “i”/”I” — and for only 2 cultures — Azeri and Turkish)

In general, this problem is called [WayBack] Case Folding and many environments do not have good and ready to use solutions for this.

Basically when working with case-insensitive language identifiers, you should always use culture invariant text comparison operations. In most languages, people use either lowercase or uppercase converted operations which for Delphi >= come down to using :

The reason is simple:

  • without any parameter, ToLower and ToUpper will use [Archive.isSysLocale.DefaultLCID.
  • without any parameter, LowerCase and UpperCase will implicitly behave as if called with TLocaleOptions.loInvariantLocale, but lots of people forget they do.

The functions ToLowerInvariant and  ToUpperInvariant  were added in Delphi XE3, but ToLower(LocaleID) and ToUpper(LocaleID) in Delphi XE4.

Instead of doing uppercase and lowercase comparisons you could also use the [Archive.isSystem.SysUtils.CompareText function.

IBX however uses case conversion, and by now you will probably guessed it: IBX got it all wrong. One reproduction is at https://gist.github.com/jpluimers/643b382944ff991d07ec96abbf85548c and a thread with background is at [WayBack] What’s the Delphi equivalent of doing UpperCase with an InvariantCulture in Unicode Delphi versions? (XE and up) – Jeroen Wiert Pluimers – Google+

IBX isn’t alone: just search for other uppercase issues like Turkish i to see tons of other issues.

For IBX, I did the replacements in the diff below to fix it in Delphi XE8. I only replaced where identifiers were compared, not were actual database content was compared.

Unluckily, in the past IBX sources were hosted on CodeCentral at http://cc.embarcadero.com/Author/102 but no new bundles have been released since 2012.

Of all the locations I think IBX should not have used any case conversion here:

IBX.IBDatabaseINI.pasfunction LocalServerPath(sFile: string): string

This function uses LowerCase() but I think an NTFS specific comparison should have been used, but I’ve not investigated into a solution for that yet.

–jeroen

Read the rest of this entry »

Posted in Delphi, Delphi 10 Seattle, Delphi 10.1 Berlin (BigBen), Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Delphi XE8, Development, Software Development | Leave a Comment »

Reminder to self: check out “Debugging helper for TDataSet” and “debugger TDataSetVisualizer” for Delphi

Posted by jpluimers on 2018/04/24

So I won’t forget to check these out:

Via  [WayBackI like programming in Delphi, but I don’t particularly like writing applications that work with database backends… – Thomas Mueller (dummzeuch) – Google+ (thanks Stefan Glienke)

Read the rest of this entry »

Posted in Delphi, Delphi 10 Seattle, Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Delphi XE8, Development, Software Development | 1 Comment »

How to embed a superscript Registered symbol in a Rave memo buffer.

Posted by jpluimers on 2018/04/24

Thomas Pfister came with a nice solution to this question:

[WayBack] Does anyone know how to embed a superscript Registered symbol in a Rave memo buffer? – Phillip Woon – Google+

Since Google has such bad indexing of G+, here is the solution:

procedure TForm4.RvSystem1Print(Sender: TObject);
const
  SuperscriptOn = RPTFPrefix + RPTFSuperscript + RPTFOn + RPTFSuffix; // from RpDefine.pas
  SuperscriptOff = RPTFPrefix + RPTFSuperscript + RPTFOff + RPTFSuffix;
var
  MemoBuf: TMemoBuf;
begin
  MemoBuf := TMemoBuf.Create;
  try
    MemoBuf.Text := 'Test' + SuperscriptOn + '®' + SuperscriptOff + ' Test';
    MemoBuf.PrintStart := 0.5;
    MemoBuf.PrintEnd := 8.0;

    with Sender as TBaseReport do begin
      PrintMemo(MemoBuf, 1, true);
    end;
  finally
    FreeAndNil(MemoBuf);
  end;
end;

–jeroen

Source: Does anyone know how to embed a superscript Registered symbol in a Rave memo …

Posted in Delphi, Delphi 10 Seattle, Delphi 10.1 Berlin (BigBen), Delphi 2007, Delphi 2009, Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Delphi XE8, Development, Software Development | Leave a Comment »

Tip for the doc team: make TMonitor.Enter docs more clear on non-blocking re-entry from the same thread

Posted by jpluimers on 2018/04/19

Even when the Delphi team was large, the documentation was lacking, so with the reduced Delphi team size, I don’t have high expectations of the below to get fixed.

But since much of the post Delphi 7 run-time library looks a lot like the .NET core, you can usually fallback to the Microsoft documentation.

Tip for the doc team: make http://docwiki.embarcadero.com/Libraries/en/System.TMonitor.Enter more clear. Especially that if the same thread calls TMonitor.Enter more than one time, it will allow entry without blocking as per System.Threading.Monitor.Enter Method (Object) documentation https://msdn.microsoft.com/en-us/library/de0542zz

(note that this got introduced in Delphi XE3: http://docwiki.embarcadero.com/Libraries/XE3/en/System.TMonitor.Enter)

–jeroen

via: [WayBack] Tip for the doc team: make http://docwiki.embarcadero.com/Libraries/Seattle/e…

Posted in Delphi, Delphi 10 Seattle, Delphi 10.1 Berlin (BigBen), Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Delphi XE8, Development, Software Development | 2 Comments »

Reminder to Self: `TProc` is incompatible with parameterless procedures on interfaces

Posted by jpluimers on 2018/04/19

I knew that methods on interfaces were not compatible with the procedure of object (like [WayBack] TProc)or function of object construct, but they are also not compatible with the reference to procedure or reference to function construct.

Via: [WayBack] I try to call an Interface method from TThread.Syncrhonize()…and Berlin don’t accept that… – Paul TOTH – Google+

If you want it fixed, vote for [RSP-13007] Interface methods are not assignable to anonymous method variable – Embarcadero Technologies (Thanks Stefan Glienke).

You can work around it with an anonymous method.

This won’t work:

program Project1;
{$APPTYPE CONSOLE}
uses
  SysUtils;
 
type
  ITest = interface
    ['{B5AD87E8-A3DF-4B83-BE14-997C2E76A06C}']
    procedure Run;
  end;
 
  TTest = class(TInterfacedObject, ITest)
    procedure Run;
  end;
 
procedure TTest.Run;
begin
  Writeln('PASS')
end;
 
var
  test: ITest; // <- change this to TTest and it compiles
  proc: TProc;
begin
  test := TTest.Create;
  proc := procedure begin test.Run; end; // <- this compiles
  proc := test.Run; // E2010 Incompatible types: 'TProc' and 'procedure, untyped pointer or untyped parameter'
  proc();
  Readln;
end.

–jeroen

 

Posted in Delphi, Delphi 10 Seattle, Delphi 10.1 Berlin (BigBen), Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Delphi XE8, Development, Software Development | Leave a Comment »