The Wiert Corner – irregular stream of stuff

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

  • My badges

  • Twitter Updates

    • RT @michaelbolton: 1) Your periodic reminder: a test is not something we *write*. We write text and programs. A test is an experiment you *… 43 minutes ago
    • RT @BiancaPrins: Voor ons allemaal, een #draadje om tot het einde te lezen..... Juist nu (Volgt nog meer in de komende dagen) https://t.co… 43 minutes ago
    • RT @McKayMSmith: 90) His entire life, Ben has chosen to place his faith in the law. “Law, not war” has been his motto for decades. “I hav… 44 minutes ago
    • RT @McKayMSmith: 82) “It's possible to take the most fundamental, strongly held ideas and change them. What makes people change? Sometimes… 45 minutes ago
    • RT @McKayMSmith: 65) “Now I will tell you something very profound, which I have learned after many years. War makes murderers out of otherw… 48 minutes ago
  • 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,640 other followers

Archive for the ‘Delphi 5’ Category

Ken Thompson – quotes – Reflections on Trust

Posted by jpluimers on 2016/12/21

Some of the Ken Thompson – Wikiquote entries come from a great 1983 ACM Turing Award Acceptance Lecture “Reflections on Trusting Trust”.

That lecture used to be on http://cm.bell-labs.com/who/ken/trust.html

But it isn’t, and it’s not in the WayBack machine and neither in the Google Cache because of the robots.txt. Historic link rot galore!

The lecture is about compiler viruses and viruses actually did this at least a few times: Delphi in the 2009 and to XCode in 2015.

A few nice links from ACM Classic: Reflections on Trusting Trust – Google Groups though:

And archived versions of (I hope accurate) copies of the article:

Finally I found a PDF copy of the original ACM prints that Greg Ganger of Electrical and Computer Engineering at Carnegie Mellon University has online. It’s archived too.

–jeroen

Further reading:

Posted in *nix, Delphi, Delphi 4, Delphi 5, Delphi 6, Delphi 7, Development, Fun, Power User, Quotes, Software Development, T-Shirt quotes, xCode/Mac/iPad/iPhone/iOS/cocoa | Leave a Comment »

The curse of the Project.res file.

Posted by jpluimers on 2016/11/29

A long time ago, Lars Fosdal wrote this on the Delphi G+ group:

It really is beyond me why there is no Project.rc file which includes

  • Project.version.rc
  • Project.icon.rc
  • Project.themes.rc
  • Project.manifest.xml
  • and so forth.

That way, the .res file would be a compile-time thing (or even a thing of the past) – and the resource linker would assemble the various bits from their individual sources.

It has been an issue forever. Vincent Parrett correctly commented that if you clean out too much out of the Project.res file, the IDE gets confused:

The only thing it is used for is version info and the mainicon (the IDE gets confused if don’t do that).

In my own experience, this isn’t the case for all Delphi versions, but I forgot which versions suffer and which don’t. I think the IDE theming issue omitting the Application word in the .dpr is related.

Like many of the G+ commenters, I’ve switched to script based resources for my own projects a long time ago. That’s also the reason why I forgot: this approach just works for any Delphi version.

This post is a reminder to self to see if the IDE has finally refrained from doing Project.res handling itself.

–jeroen

Source: The curse of the Project.res file…

Some related posts:

Posted in Delphi, Delphi 1, Delphi 10 Seattle, Delphi 2, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 3, Delphi 4, Delphi 5, Delphi 6, Delphi 7, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Delphi XE8, Development, Software Development | 5 Comments »

Why sometimes you *want* to to have your DFM files stored as binary

Posted by jpluimers on 2016/08/25

Delphi Component/Tool vendors have to support a truckload of Delphi and C++ Builder versions which can be a pain: they have to work around problems in Delphi and C++ Builder versions that have long been abandoned by Borland/CodeGear/Embarcadero/Idera/…

This means that sometimes the Delphi Component/Tool vendors have to work around stuff in a way normal applications vendors would never do.

Recently I learned that sometimes this can be a painful thing: keeping DFM files in binary state.

I’m not kidding about either the DFM file format nor about supporting old versions:

  • Delphi has supported text based DFM files since like Delphi 2 for most of the features (yes, ‘most’ is the crucial word here) and by default stored DFM files in text format since Delphi 5.
  • For the Component/Tool Vendors, even Delphi 7 makes money though usually less than Delphi 2007 or the C++ Builder side of things.

The ‘most’ applies to this nice ARM compiler bug in Delphi 19.0.13856.4978 (for mere mortals, that’s Update 1 for RAD Studio XE5, Delphi XE5 and C++Builder XE5; I wish vendors would list those numbers/products in a central place):

  • [Android] MsBuild (dccAarm) error when compile FireMonkeyMobile projects with fmx forms
  • Project:  Delphi
  • Build #:  19.0.13856.4978

Source: [WayBack] QualityCentral

That’s why TeeChart still has most DFM files stored as binary files (again the ‘most’ word).

For version control and searching this is a pain, so normal application developers (the ones not using Delphi XE5 Update 1 for Android work) should run convert.exe with the -t (target=text) switch on DFM binary files.

Oh: this is fixed in version 19.0.13856.4978 (yes, that’s XE5 Update 2).

–jeroen

Via:

 

Posted in Delphi, Delphi 10 Seattle, Delphi 10.1 Berlin (BigBen), Delphi 2, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 3, Delphi 4, Delphi 5, Delphi 6, Delphi 7, Delphi x64, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Delphi XE8, Development, Kylix, QC, Software Development | Leave a Comment »

Canonical overview on Writing to the Windows Event Log using Delphi – Stack Overflow

Posted by jpluimers on 2016/07/26

A while ago, StackOverflow user Kobus Smit did some brilliant editorial work that – due to current state of StackOverflow – sort of fired backwards: his question got marked as duplicate before he could post his excellent answer. After that answer was posted, the oh-so pride SO-demi gods never took any energy to revisit to see which answers were best.

His simple question:

How can my Delphi app easily write to the Windows Event Log?What is the difference between TEventLogger and ReportEvent? How do I use the ReportEvent function?

Which somehow should be encompassed by this Delphi 5 question (apparently that 15+ year old Delphi version is still considered current by the SO demi-gods).

The answer summarises and extends existing answers spread out over StackOverflow and adds an EventLog git repository wrapping the ReportEvent and RegisterEventSource (which somehow is always a pain: Delphi services for instance often forget that).

Lesson learned when doing editorial work:

  1. prepare both the answer and question in markdown off-line
  2. ensure you mention in the question that the answer is meant as collection of “best of” answers found elsewhere
  3. post the question and answer in rapid succession
  4. cross your fingers for the StackOverflow demi-gods being in a good mood

–jeroen

via: Writing to the Windows Event Log using Delphi – Stack Overflow

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

Happy birthday Delphi, have some wine

Posted by jpluimers on 2016/02/14

Now that you’re 21, have a glass of wine and watch this great presentation by Warren Postma which he made for last years birthday:

–jeroen

Posted in Delphi, Delphi 1, 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 | Leave a Comment »

 
%d bloggers like this: