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,603 other followers

Archive for the ‘Delphi’ Category

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 »

 
%d bloggers like this: