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

Archive for the ‘Delphi’ Category

Validating a nested XML element with an empty namespace using XSD – Stack Overflow

Posted by jpluimers on 2018/11/06

In a quest for making Delphi Group Project XML files (with extension .groupproj) validate with XSD, I had to find out about [WayBackValidating a nested XML element with an empty namespace using XSD – Stack Overflow.

I needed the XSD so I could import it in Delphi in order to write a good .groupproj file generator.

They are here:

And some more background posts are here:

–jeren

Posted in Delphi, Development, Software Development, XML, XML/XSD, XSD | 1 Comment »

Delphi: create implementations in the same order as the interface section and sync method signatures

Posted by jpluimers on 2018/10/30

An interesting question at [WayBack] Previously i have not been big on IDE plugins.So i’m blatantly asking for pointers on the following, i.e. is there already such beasts? Or maybe i’m i… – Dany Marmur – Google+:

… asking for pointers on the following…

Crtl+C – create implementations in the same order as the interface section?
Ctrl+C – adjust the signature of the method the cursor is on interface if implementation and vice versa.

I realise they can both be very tricky to implement. Second function might not be able to handle overloads.

From that thread, a few things you might want to try:

  • [WayBack] ModelMaker Code Explorer can do both.
  • [Archive.is] DDevExtensions version 2.82 (2014-08-25): introduced “Added: Disable Alpha-Sort Class Completion (Default off)”
  • More recent versions of the IDE (I think 10.0) incorporated the “sync prototypes” action (Shift+Ctrl+Alt+P) from Castalia.

–jeroen

 

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

Google is sunsetting Google+ by August 2019; DelphiPraxis might start English forums and have RSS

Posted by jpluimers on 2018/10/26

From [WayBack1/WayBack2] Google is sunsetting Google+ by August 2019. “sunsetting” – clarification: “no fucks were given about current users” Edit: Sticky while the shock facto… – Lars Fosdal – Google+ I learned the very successful German forum site DelphiPraxis might start English forums.

Given the excellent track record of Embarcadero maintaining infrastructure up and running for the long therm, DelphiPraxis just might be the way to go:

  • like the Delphi G+ community, DelphiPraxis are independent of Embarcadero
  • unlike Embarcadero, DelphiPraxis have managed to keep forums running since 2002 without doing pruning of old messages

Some links:

Edit:

The English board has three public RSS streams as per [WayBack] RSS feeds for new posts ? – Community Management – Delphi-PRAXiS [en]:

  1. https://en.delphipraxis.net/discover/all.xml/
  2. https://en.delphipraxis.net/rssalltopics.xml/
  3. https://en.delphipraxis.net/rss/1-new-topics.xml

The first has all posts and all comments, so is really noisy.

The second seems to be the best for just new posts.

Via: [WayBack] Have you registered at https://en.delphipraxis.net yet? If you haven’t migrated your daily Delphi browsing to Delphi-PRAXiS yet, you should. The reason… – Lars Fosdal – Google+

–jeroen

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

Some Delphi versions miss some of the Indy files

Posted by jpluimers on 2018/10/25

Depending on your Delphi versions, you will likely miss Indy files:

The gap between XE and XE8 is not covered, but these versions miss a lot of files too.

The cause is that Embarcadero uses their own version control system, which is merged down and up to the Indy Subversion repository at irregular and incomplete intervals likely lacking a process checking if the merge results are OK.

Related:

You can get the missing files from GitHub – graemeg/indy.

This is the delta from Delphi 2010 to XE:

...\Indy10\Core\de\IdDsnCoreResourceStrings.pas
...\Indy10\Core\de\IdResourceStringsCore.pas
...\Indy10\Core\fr\IdDsnCoreResourceStrings.pas
...\Indy10\Core\fr\IdResourceStringsCore.pas
...\Indy10\Core\ja\IdDsnCoreResourceStrings.pas
...\Indy10\Core\ja\IdResourceStringsCore.pas
...\Indy10\Core\dclindycore.res
...\Indy10\Core\IdAboutVCL.rc
...\Indy10\Core\indycore.res
...\Indy10\Protocols\de\IdDsnResourceStrings.pas
...\Indy10\Protocols\de\IdHTTPWebBrokerBridge.pas
...\Indy10\Protocols\de\IdMessageBuilder.pas
...\Indy10\Protocols\de\IdResourceStringsProtocols.pas
...\Indy10\Protocols\de\IdZLibConst.pas
...\Indy10\Protocols\fr\IdDsnResourceStrings.pas
...\Indy10\Protocols\fr\IdHTTPWebBrokerBridge.pas
...\Indy10\Protocols\fr\IdMessageBuilder.pas
...\Indy10\Protocols\fr\IdResourceStringsProtocols.pas
...\Indy10\Protocols\fr\IdZLibConst.pas
...\Indy10\Protocols\ja\IdDsnResourceStrings.pas
...\Indy10\Protocols\ja\IdHTTPWebBrokerBridge.pas
...\Indy10\Protocols\ja\IdMessageBuilder.pas
...\Indy10\Protocols\ja\IdResourceStringsProtocols.pas
...\Indy10\Protocols\ja\IdZLibConst.pas
...\Indy10\Protocols\dclindyprotocols.res
...\Indy10\Protocols\IdAllAuthentications.pas
...\Indy10\Protocols\IdAllHeaderCoders.pas
...\Indy10\Protocols\IdAuthenticationSSPI.pas
...\Indy10\Protocols\IdBlockCipherIntercept.pas
...\Indy10\Protocols\IdCompressorZLib.pas
...\Indy10\Protocols\IdFIPS.pas
...\Indy10\Protocols\IdFTPListParseIEFTPGateway.pas
...\Indy10\Protocols\IdFTPListParsePCNFSD.pas
...\Indy10\Protocols\IdFTPListParsePCTCP.pas
...\Indy10\Protocols\IdFTPListParseSuperTCP.pas
...\Indy10\Protocols\IdFTPListParseTandemGuardian.pas
...\Indy10\Protocols\IdFTPListParseUnisysClearPath.pas
...\Indy10\Protocols\IdHashSHA.pas
...\Indy10\Protocols\IdHeaderCoder2022JP.pas
...\Indy10\Protocols\IdHeaderCoderBase.pas
...\Indy10\Protocols\IdHeaderCoderPlain.pas
...\Indy10\Protocols\IdHMAC.pas
...\Indy10\Protocols\IdHMACMD5.pas
...\Indy10\Protocols\IdHMACSHA1.pas
...\Indy10\Protocols\IdHTTPWebBrokerBridge.pas
...\Indy10\Protocols\IdMessageBuilder.pas
...\Indy10\Protocols\IdSASL_CRAM_SHA1.pas
...\Indy10\Protocols\IdSASL_CRAMBase.pas
...\Indy10\Protocols\IdSASLDigest.pas
...\Indy10\Protocols\IdSSLOpenSSLUtils.pas
...\Indy10\Protocols\IdSSPI.pas
...\Indy10\Protocols\IdUriUtils.pas
...\Indy10\Protocols\IdWebDAV.pas
...\Indy10\Protocols\IdZLib.pas
...\Indy10\Protocols\IdZLibConst.pas
...\Indy10\Protocols\IdZLibHeaders.pas
...\Indy10\Protocols\indyprotocols.res
...\Indy10\System\de\IdResourceStrings.pas
...\Indy10\System\fr\IdResourceStrings.pas
...\Indy10\System\ja\IdResourceStrings.pas

This is the delta from XE to XE2 (i.e. missing as of Delphi XE2) the same sources added to XE have been gone on XE2:

...\Indy10\Core\de\IdDsnCoreResourceStrings.pas
...\Indy10\Core\de\IdResourceStringsCore.pas
...\Indy10\Core\fr\IdDsnCoreResourceStrings.pas
...\Indy10\Core\fr\IdResourceStringsCore.pas
...\Indy10\Core\ja\IdDsnCoreResourceStrings.pas
...\Indy10\Core\ja\IdResourceStringsCore.pas
...\Indy10\Core\dclIndyCore.dpk
...\Indy10\Core\dclindycore.res
...\Indy10\Core\IdAboutVCL.pas
...\Indy10\Core\IdAboutVCL.rc
...\Indy10\Core\IdAntiFreeze.pas
...\Indy10\Core\IdCoreDsnRegister.pas
...\Indy10\Core\IdCoreRegisterCool.dcr
...\Indy10\Core\IdCoreSelectionEditors.pas
...\Indy10\Core\IdDsnCoreResourceStrings.pas
...\Indy10\Core\IdDsnPropEdBindingVCL.pas
...\Indy10\Core\IdRegisterCore.pas
...\Indy10\Protocols\de\IdDsnResourceStrings.pas
...\Indy10\Protocols\de\IdHTTPWebBrokerBridge.pas
...\Indy10\Protocols\de\IdMessageBuilder.pas
...\Indy10\Protocols\de\IdResourceStringsProtocols.pas
...\Indy10\Protocols\de\IdZLibConst.pas
...\Indy10\Protocols\fr\IdDsnResourceStrings.pas
...\Indy10\Protocols\fr\IdHTTPWebBrokerBridge.pas
...\Indy10\Protocols\fr\IdMessageBuilder.pas
...\Indy10\Protocols\fr\IdResourceStringsProtocols.pas
...\Indy10\Protocols\fr\IdZLibConst.pas
...\Indy10\Protocols\ja\IdDsnResourceStrings.pas
...\Indy10\Protocols\ja\IdHTTPWebBrokerBridge.pas
...\Indy10\Protocols\ja\IdMessageBuilder.pas
...\Indy10\Protocols\ja\IdResourceStringsProtocols.pas
...\Indy10\Protocols\ja\IdZLibConst.pas
...\Indy10\Protocols\dclIndyProtocols.dpk
...\Indy10\Protocols\dclindyprotocols.res
...\Indy10\Protocols\IdDsnRegister.pas
...\Indy10\Protocols\IdDsnResourceStrings.pas
...\Indy10\Protocols\IdDsnSASLListEditorFormVCL.pas
...\Indy10\Protocols\IdRegister.pas
...\Indy10\Protocols\IdRegisterCool.dcr
...\Indy10\System\de\IdResourceStrings.pas
...\Indy10\System\fr\IdResourceStrings.pas
...\Indy10\System\ja\IdResourceStrings.pas

In fact more are missing, the Delphi 2007 to 2009 delta was this:

...\Indy10\Core
...\Indy10\Core\dclIndyCore.dpk
...\Indy10\Core\dclindycore.dpkw
...\Indy10\Core\dclIndyCore.drc
...\Indy10\Core\dclindycore.res
...\Indy10\Core\IdAbout.pas
...\Indy10\Core\IdAboutDotNET.pas
...\Indy10\Core\IdAboutVCL.pas
...\Indy10\Core\IdAntiFreeze.pas
...\Indy10\Core\IdCoreDsnRegister.pas
...\Indy10\Core\IdCoreRegister.dcr
...\Indy10\Core\IdDsnBaseCmpEdt.pas
...\Indy10\Core\IdDsnCoreResourceStrings.pas
...\Indy10\Core\IdDsnPropEdBinding.pas
...\Indy10\Core\IdDsnPropEdBindingNET.pas
...\Indy10\Core\IdDsnPropEdBindingVCL.pas
...\Indy10\Core\IdRegisterCore.pas
...\Indy10\Core\indycore.dpkw
...\Indy10\Core\IndyCore.drc
...\Indy10\Protocols
...\Indy10\Protocols\dclIndyProtocols.dpk
...\Indy10\Protocols\dclindyprotocols.dpkw
...\Indy10\Protocols\dclIndyProtocols.drc
...\Indy10\Protocols\dclindyprotocols.res
...\Indy10\Protocols\IdCompressorZLibEx.pas
...\Indy10\Protocols\IdDsnRegister.pas
...\Indy10\Protocols\IdDsnResourceStrings.pas
...\Indy10\Protocols\IdDsnSASLListEditor.pas
...\Indy10\Protocols\IdDsnSASLListEditorForm.pas
...\Indy10\Protocols\IdDsnSASLListEditorFormVCL.pas
...\Indy10\Protocols\IdHashSHA1.pas
...\Indy10\Protocols\IdHL7.pas
...\Indy10\Protocols\IdMIMETypes.pas
...\Indy10\Protocols\IdRegister.dcr
...\Indy10\Protocols\IdRegister.pas
...\Indy10\Protocols\IdRegisterCool.dcr
...\Indy10\Protocols\IdSSLOpenSSLHeadersNET.pas
...\Indy10\Protocols\IdZLibEx.pas
...\Indy10\Protocols\indyprotocols.dpkw
...\Indy10\Protocols\IndyProtocols.drc
...\Indy10\System
...\Indy10\System\IdObjs.pas
...\Indy10\System\IdObjsBase.pas
...\Indy10\System\IdObjsVCL.pas
...\Indy10\System\IdStackLinux.pas
...\Indy10\System\IdSys.pas
...\Indy10\System\IdSysBase.pas
...\Indy10\System\IdSysNativeVCL.pas
...\Indy10\System\IdSysNet.pas
...\Indy10\System\IdSysVCL.pas
...\Indy10\System\IdSysVCLNet.pas
...\Indy10\System\IdSysWin32.pas
...\Indy10\System\IndySystem.drc

RS … mentiones the files missing as of Berlin, but in fact many other delphi versions miss files too.

File only in Indy SVN: 'Core\IdAbout.pas'
File only in Indy SVN: 'Core\IdAboutDotNET.pas'
File only in Indy SVN: 'Core\IdAboutVCL.pas'
File only in Indy SVN: 'Core\IdAntiFreeze.pas'
File only in Indy SVN: 'Core\IdCoreDsnRegister.pas'
File only in Indy SVN: 'Core\IdDsnBaseCmpEdt.pas'
File only in Indy SVN: 'Core\IdDsnCoreResourceStrings.pas'
File only in Indy SVN: 'Core\IdDsnPropEdBinding.pas'
File only in Indy SVN: 'Core\IdDsnPropEdBindingNET.pas'
File only in Indy SVN: 'Core\IdDsnPropEdBindingVCL.pas'
File only in Indy SVN: 'Core\IdRegisterCore.pas'
File only in Indy SVN: 'Core\indycorefpc.pas'
File only in Indy SVN: 'Design\IdDsnCoreResourceStrings.pas'
File only in Indy SVN: 'Design\IdDsnNETCompEditor.pas'
File only in Indy SVN: 'Design\IdDsnPropEdBindingNET.pas'
File only in Indy SVN: 'Protocols\IdASN1Coder.pas'
File only in Indy SVN: 'Protocols\IdCoderTNEF.pas'
File only in Indy SVN: 'Protocols\IdDsnRegister.pas'
File only in Indy SVN: 'Protocols\IdDsnResourceStrings.pas'
File only in Indy SVN: 'Protocols\IdDsnSASLListEditor.pas'
File only in Indy SVN: 'Protocols\IdDsnSASLListEditorForm.pas'
File only in Indy SVN: 'Protocols\IdDsnSASLListEditorFormNET.pas'
File only in Indy SVN: 'Protocols\IdDsnSASLListEditorFormVCL.pas'
File only in Indy SVN: 'Protocols\IdDummyUnit.pas'
File only in Indy SVN: 'Protocols\IdHashAdler32.pas'
File only in Indy SVN: 'Protocols\IdHashIntf.pas'
File only in Indy SVN: 'Protocols\IdHashSHA1.pas'
File only in Indy SVN: 'Protocols\IdHeaderCoderBig5.pas'
File only in Indy SVN: 'Protocols\IdHL7.pas'
File only in Indy SVN: 'Protocols\IdHostnameServer.pas'
File only in Indy SVN: 'Protocols\IdLDAPV3.pas'
File only in Indy SVN: 'Protocols\IdLDAPV3Coder.pas'
File only in Indy SVN: 'Protocols\IdMIMETypes.pas'
File only in Indy SVN: 'Protocols\IdNTLMv2.pas'
File only in Indy SVN: 'Protocols\IdPOP4Server.pas'
File only in Indy SVN: 'Protocols\IdRegister.pas'
File only in Indy SVN: 'Protocols\IdResourceStringsSSLDotNet.pas'
File only in Indy SVN: 'Protocols\IdSASL_NTLM.pas'
File only in Indy SVN: 'Protocols\IdServerIOHandlerSSLOpenSSL.pas'
File only in Indy SVN: 'Protocols\IdSSH.pas'
File only in Indy SVN: 'Protocols\IdSSLDotNET.pas'
File only in Indy SVN: 'Protocols\IdTunnelCommon.pas'
File only in Indy SVN: 'Protocols\IdTunnelMaster.pas'
File only in Indy SVN: 'Protocols\IdTunnelSlave.pas'
File only in Indy SVN: 'Protocols\IdUserAccountsOTP.pas'
File only in Indy SVN: 'Protocols\indyprotocolsfpc.pas'
File only in Indy SVN: 'Protocols\ZLib\ZLib.pas'
File only in Indy SVN: 'Protocols\ZLib\ZLibConst.pas'
File only in Indy SVN: 'System\IdAssemblyInfo.pas'
File only in Indy SVN: 'System\IdIconv.pas'
File only in Indy SVN: 'System\IdResourceStringsDotNet11.pas'
File only in Indy SVN: 'System\IdResourceStringsIconv.pas'
File only in Indy SVN: 'System\IdResourceStringsKylixCompat.pas'
File only in Indy SVN: 'System\IdResourceStringsTextEncoding.pas'
File only in Indy SVN: 'System\IdStackDotNet.pas'
File only in Indy SVN: 'System\IdStackLibc.pas'
File only in Indy SVN: 'System\IdStackLinux.pas'
File only in Indy SVN: 'System\IdStackUnix.pas'
File only in Indy SVN: 'System\IdStreamNET.pas'
File only in Indy SVN: 'System\IdTransactedFileStream.pas'
File only in Indy SVN: 'System\indysystemfpc.pas'aa

–jeroen

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

Why I wish QC had been archived in full…

Posted by jpluimers on 2018/10/25

A quick search later and it seems I’m bumping into [WayBack] http://qc.embarcadero.com/wc/qcmain.aspx?d=125403 (the version I’m bugfixing is built using XE6).

The workaround listed (in my case blanking indexfieldnames in OnBeforeClose) works.

Now… imagine if this had been filed to QualityPortal instead.

I would have had to remember to search it, and maybe wouldn’t have found it as Google does fuzzy searches very well.

And due to the lower visibility it likely would have fewer comments as well…

So yeah EMB/Idera, please revisit the choice of walling up QualityPortal.

Source: [WayBack] So I just hit a weird issue in our program. A quick search later and it seems I’m bumping into this http://qc.embarcadero.com/wc/qcmain.aspx?d=125403… imagine if it had been in QualityPortal… – Asbjørn Heid – Google+

–jeroen

 

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

Finding your program with an “Access Denied” (Error code 5) after lunch break…

Posted by jpluimers on 2018/10/24

Via: [WayBack] I just returned from lunch break and found my program faulted with an “Access Denied” (Error code 5) error in a call to Mouse.GetCoursorPos and was wond… – Thomas Mueller (dummzeuch) – Google+:

All of [WayBackGetCursorPos, [WayBackGetCursorInfo and [WayBack] GetKeyState can cause an “Access Denied” (Error code 5) when they do not have permission for the current desktop (for instance the logon desktop when a screen-saver has kicked in).

Solution: write a wrapper around it then [WayBack] patch calls going to the original into the patch [WayBack] delphi – Explain errors from GetKeyState / GetCursorPos – Stack Overflow

–jeroen

Posted in .NET, C#, C++, Delphi, Development, Software Development, Windows Development | Leave a Comment »

Delphi: uninstalling the ancient CollabNet 1.7.5 version

Posted by jpluimers on 2018/10/24

Somehow the integration team at Embarcadero still hasn’t discovered there are [WayBack] newer CollabNet SVN Client versions than 1.7.5 which has been shipped since Delphi XE3 until Delphi XE6. The newer version (currently 1.8.8 when writing this, now 1.10.2 in 2018) have plenty [WayBack1/WayBack2SVN security issues fixed.

The easiest way to uninstall the CollabNet SVN Client is running this small script:


call :start %ProgramFiles%
call :start %ProgramFiles(x86)%
goto :end
:start
startlocal
set CollabNet="%*\CollabNet\uninst.exe"
echo %CollabNet%
if exist %CollabNet% start "CollabNet uninstall" %CollabNet%
endlocal
goto :end
:end

Then install the [WayBackSlik SVN client. Like [WayBackЈοеу, I’ve switched to [WayBackSlik SVN a long ago. Here is [WayBackhis reasoning:

I have long since stopped using the CollabNet-branded version because it’s behind a registration wall. I found Slik SVN as a good alternative. It’s exactly the same command-line client you get from CollabNet, sans the hassle in downloading it.

I hope someone at Embarcadero enters this in QC^w QualityPortal as I’m awaiting Embarcadero response about a security issue there.

–jeroen

Posted in Delphi, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Development, QC, Software Development, Source Code Management, Subversion/SVN | 2 Comments »

Delphi Rio “new overall direction of removing ARC”

Posted by jpluimers on 2018/10/23

Finally: “new overall direction of removing ARC” for Delphi 10.3 Rio and later.

Via [WayBack] Delphi Rio – New IDE Configuration with Search Box – New compiler dialog – Improve code completion – Inline variables – Rafael Dipold – Google+

Hopefully zero-based strings are the next to go…

Related: [WayBack] Directions for ARC Memory Management in Delphi

–jeroen

Read the rest of this entry »

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

G+ thread: Do i need to create one TFormatSettings instance for every thread?

Posted by jpluimers on 2018/10/23

A very interesting thread at [WayBack] Do i need to create one TFormatSettings instance for each thread that needs it? If i want the same settings (for all threads), th… – Dany Marmur – Google+

It’s about:

Recommended reading!

It made me go back to these style guides (from oldest to newest):

And Stefan Glienke reminded me naming is always hard, so I found back these from a distant past:

Note most of the above Links point to (archives of) Delphi 2007 documentation as the behaviour is that old and that the below identifiers  were not mentioned in the thread.

The FormatSettings variable was introduced in Delphi XE but only documented in XE2 and up.

Until that, other global variables like the [WayBackSysUtils.DecimalSeparator Variable were used.

–jeroen

Read the rest of this entry »

Posted in Delphi, Development, internatiolanization (i18n) and localization (l10), Software Development | Leave a Comment »

Some Indy SSL Perfect Forward Secrecy links

Posted by jpluimers on 2018/10/18

Some links on Indy SSL Perfect Forward Secrecy especially for the [WayBackSSL_CTX_set_ecdh_auto method that was introduced in OpenSSL 1.0.2.

Indy now has it built in: [WayBack] Patches from Jeroen Wiert Pluimers: · graemeg/indy@659f629 · GitHub (this is on a regular git mirror of the official Indy svn repository).

–jeroen

 

Posted in Delphi, Development, Indy, Software Development | 1 Comment »