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,862 other subscribers

Archive for the ‘Delphi’ Category

Splitting user settings from your Delphi projects:  DprojSplitter by Uwe Raabe

Posted by jpluimers on 2019/06/20

Reminder to self to try this out: [WayBackWorking in a team? DprojSplitter might be helpful! | The Art of Delphi Programming.

The most recent version (covering a wider range of Delphi versions) was at [WayBackDprojSplitter for Delphi XE2 to XE6 available | The Art of Delphi Programming.

DprojSplitter handles the current build configuration and current plattform. In addition these settings are handled, too (found in CommonOptionStrs):

sDebugger_RunParams,
sDebugger_RemoteRunParams,
sDebugger_HostApplication,
sDebugger_RemotePath,
sDebugger_RemoteHost,
sDebugger_EnvVars,
sDebugger_SymTabs,
sDebugger_Launcher,
sDebugger_RemoteLauncher,
sDebugger_IncludeSystemVars,
sDebugger_UseLauncher,
sDebugger_UseRemoteLauncher,
sDebugger_CWD,
sDebugger_RemoteCWD,
sDebugger_RemoteDebug,
sDebugger_DebugSourcePath,
sDebugger_LoadAllSymbols,
sDebugger_LoadUnspecifiedSymbols,
sDebugger_SymbolSourcePath

Heck, you can even configure the ones to split: [WayBackConfiguring DprojSplitter to Your Needs | The Art of Delphi Programming

–jeroen

via:

Posted in Delphi, Development, Software Development | Leave a Comment »

Switching Delphi XML DOM vendors

Posted by jpluimers on 2019/06/18

I thought I had written a blog article on switching DOM vendors before, but in retrospect that was a conference presentation somewhere in 2011: https://github.com/jpluimers/Conferences/tree/master/2011/EKON15-Renaissance-Hotel-D%C3%BCsseldorf/Delphi-XE2-and-XML

I mentioned some of the materials at [WayBack] delphi – Reading distinct values from XML using XPath – Stack Overflow.

It was back in the days I worked for better office, Gwan Tan was still alive and CodePlex was still a thing. Now the code is at [WayBack] bo library – CodePlex Archive: An archive of the CodePlex open source hosting site.

Some recovered bits are at https://gist.github.com/jpluimers/98dcec944538fd6986fd2d51f7a79d8b#file-mainformunit-pas that shows the selection process of a TDOMVendor, how to log its capabilities and how to use it all in the method procedure TMainForm.LogDomVendor(const CurrentDomVendor: TDOMVendor);

Hopefully one day I can resurrect the code one day…

Over the years, the vendor list has not changed much [WayBack] Using the Document Object Model – RAD Studio documents these vendors.

Compared to Delphi 2007 and earlier, OmniXML has gone and ADOM has entered.

On the MSXML side, you can change which version you use too, as explained in Quick tip: using MSXML v6 with TXMLDocument in D7-D2007 – DelphiFeeds.com with the original article at [WayBackQuick tip: using MSXML v6 with TXMLDocument in D7-D2007 | Delphi Haven.

Basically he overwrites MSXMLDOMDocumentCreate with a method creating the right MSXML DOM document. That has now been deprecated as [WayBack] Xml.Win.msxmldom.MSXMLDOMDocumentCreate – RAD Studio API Documentation now points to [WayBack] Xml.Win.msxmldom.TMSXMLDOMDocumentFactory.CreateDOMDocument – RAD Studio API Documentation.

List of Built-in XML Vendors

The following table shows a comparison of the XML vendors that RAD Studio supports by default:

Implementation Unit Global Variable Description
MSXML Xml.Win.msxmldom SMSXML Fastest of the built-in RAD Studio XML vendors. Windows only. Default.

For cross-platform support, you must choose a different XML vendor. If you do not specify a different XML vendor, your application does not have XML support on other platforms than Windows, and you see a run-time exception when you run your application in other platforms.

OmniXML Xml.omnixmldom sOmniXmlVendor Much faster than ADOM, but slightly slower than MSXML. Cross-platform.
ADOM Xml.adomxmldom sAdom4XmlVendor Slower than the other built-in RAD Studio XML vendors. Cross-platform.

–jeroen

Read the rest of this entry »

Posted in Delphi, Development, Software Development | Leave a Comment »

Desktop Duplication API in Delphi – CodeProject

Posted by jpluimers on 2019/06/18

Cool stuff: [WayBackDesktop Duplication API in Delphi – CodeProject.

It is based on:

There is also a GitHub repository: Delphi/DesktopDuplicationAPI at master · tothpaul/Delphi

Via: [WayBack] Little demo for the Desktop Duplication API  – Paul TOTH – Google+

–jeroen

Posted in Delphi, Development, Software Development | Leave a Comment »

DelphiTips/RecordProperty at master · tothpaul/DelphiTips · GitHub

Posted by jpluimers on 2019/06/13

Out of the box, Delphi does not support record properties because of two lacking features:

Paul Toth worked around both at [WayBack] DelphiTips/RecordProperty at master · tothpaul/DelphiTips · GitHub

He uses an intermediate helper where he redirects the get/set methods to from a property registration call.

Note that in the past, Pieter Zijlstra did a similar thing, but bumped into a Delphi 2010 problem where the status indicates it is till open: [WayBack] QualityCentral: 77635 – Open – The new RTTI of D2010 causes components with published record properties to fail to stream in.

Source: Yes ! I’ve published a Record property it could be nice to have this feature…

Via: [WayBack] Yes ! I’ve published a Record property it could be nice to have this feature in Delphi, but we need RTTI for record properties to simplify the code (an… – Paul TOTH – Google+

–jeroen

Read the rest of this entry »

Posted in Conference Topics, Conferences, Delphi, Development, Event, Software Development | Leave a Comment »

Compression Decompressed | The website of Jack Preston, Computerer

Posted by jpluimers on 2019/06/13

The basics of data compression and how Youtube, Netflix and Spotify stream your stuff.

Step by step, you take a visual tour through the image compression process.

Source: [WayBackCompression Decompressed | The website of Jack Preston, Computerer

Image source: [Archive.isTwitter GIFs – Find & Share on GIPHY

Via:

[WayBack] Compression Decompressed or, Making Things Smaller. – ThisIsWhyICode – Google+

–jeroen

 

Posted in Delphi, Development, Software Development | Leave a Comment »

Using escape characters in GExperts Grep replace – twm’s blog

Posted by jpluimers on 2019/06/12

Reminder to self: check out the the support for proper escaping special characters (like \t, \r, \n or x20 for tab, carriage-return, line-feed or space) in GExperts [WayBackUsing escape characters in GExperts Grep replace – twm’s blog

Solves:

Via: [WayBack] If you enable regular expressions in the GExperts Grep search form, you can search for escape sequences like \t which is expanded to a tab character or … – Thomas Mueller (dummzeuch) – Google+

–jeroen

Posted in Delphi, Development, GExperts, Software Development | Leave a Comment »

Cyclomatic Complexity of switch case statement – Stack Overflow

Posted by jpluimers on 2019/06/12

For my archive: [WayBack/Archive] Cyclomatic Complexity of switch case statement – Stack Overflow.

Ultimate reference: [WayBack/Archive] NIST Special Publication 500-235: Structured Testing: A Testing Methodology Using the Cyclomatic Complexity Metric

Via: [WayBack/Archive] I have a question regarding Cyclometric Complexity… IF versus CASE… – David Hoyle – Google+

–jeroen

Posted in .NET, C#, Conference Topics, Conferences, Delphi, Development, Event, Software Development | Leave a Comment »

JWT authentication with Delphi

Posted by jpluimers on 2019/06/11

Nice articles on OAuth2, JWT and other authentication mechanisms:

via [WayBack] Ondrej Kelle – Google+

–jeroen

Posted in Authentication, Delphi, Development, Power User, Security, Software Development | Leave a Comment »

Even perpetual Delphi licenses require an active maintenance support or contacting the Sales/Renewal team to allow re-install on a fresh machine

Posted by jpluimers on 2019/06/11

Edit 20190612

It seems all the fuzz sort of got restored: if you have an old product, not under maintenance support, then the registration count has been bumped and can be bumped further through the sales/renewal department.

This got posted a few hours after my blog post got live (the WayBack link does not archive all comments, sorry for that, that’s why I quoted toe comment):

[WayBack] From the GM: New Updates and Changes to the Registration “Bumps” Policy [UPDATED] – Blog – Developer Tools – IDERA Community

Policy Update: We still receive occasional comments on this and want to make sure we are clear on our Policy. Registration limits were introduced a long time ago with very valid use cases, but many of these are now outdated. We still do them, just now they get approved by Account Management (Sales/Renewals) vs. Support. Further, we have done several auto-bumps for everyone that should limit these issues altogether (and will do more as needed). As communicated, over the summer, we will work on a more automated way to increase registration limits through the self-service portal.

Original article 20190611

Last month, people found out that retroactively, Embarcadero has changed the terms of the license agreements on products sold with a perpetual license:

In order to re-install those products, often a bump in license count is needed. That bump now requires an active maintenance subscription which has a substantial yearly cost.

This is yet another sign that Embarcadero parent company Idera is on their way towards becoming like Oracle or Computer Associates: hiding information behind account walls, and by all means trying to squeeze out money of older products.

I think the move is illegal in several countries, especially with products sold to private persons. Uwe Raabe agrees with me on that:

I am not sure they would get away with that – at least here in Germany. As long as the customer actually paid for the perpetual license (this excludes the CE), the ability to use it legally cannot be prohibited just because there is no current support contract. At least a reasonable fee for the registration bump would perhaps be acceptable, but definitely not denying it completely.

If you still own Delphi licenses, and are on maintenance for them, a path you might take is to switch to a local installation (on a separate machine, preferably virtual machine) of the ELC (formerly Belise) licensing server together with a named license.

That requires your machines to be in touch with that ELC service (you can reach it over a network connection, even via a tunnel) every 30 days to stay active.

Another way is to :

  • always install in virtual machines, and keep a backup-history of those virtual machines at hand
  • use different user names for doing different Delphi work (but be aware that a lot of Delphi tools and component suites still insist on installing as Administrator, therefore putting all the settings in that administrative user)

Note that :

  • a Delphi license is bound to a Windows computer NAME, not a physical fingerprint of the machine
  • it is likely easier to keep backups of the ECL/Belise server than of a full development machine
  • ELC/Belise requires Java (JRE 1.5 or higher according to ELC Admin Guide.pdf ), which has it’s own licensing issues
  • Though ELC stands for “Enterprise License Server”, it works for one-man shops equally well as for enterprises (heck: for enterprises it is likely more work as they usually want multiple groups of licenses users)

So renaming a machine will already invalidate your license (but you can usually restore that).

Background reading:

Downloads (.bin files are for Linux x86 or x86_64; .exe files for Windows Win32 or Win64):

 

 

–jeroen

Read the rest of this entry »

Posted in Delphi, Development, Software Development | 3 Comments »

Re-read “I am looking for a good replacement for INI files for storing large/complex configuration”

Posted by jpluimers on 2019/06/06

Reminder to re-read [WayBackI am looking for a good replacement for INI files for storing large / complex configuration. So far I have used JvApplicatoinIniStorage + a custom INI f… – Thomas Mueller (dummzeuch) – Google+

INI files are textual and allow for comments. They are not good at large bits of information, and are hard to compare because the order is unimportant.

Alternatives like JSON or DFM have similar limitations.

XML is too chatty, and hard to get right by humans.

Related: [WayBack] JSON as configuration files: please don’t

–jeroen

Posted in Delphi, Development, Software Development | Leave a Comment »