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

Archive for the ‘Delphi XE6’ Category

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 »

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:

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 »

“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.

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 »

 
%d bloggers like this: