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

E2026 or W1023 – take your pick (:

Posted by jpluimers on 2018/08/08

[WayBack] A compiler curiosity I’ve learned today … – David Berneda – Google+: depending on if TEST is defined or not, you get E1026 or W1023.

// This works:
{$IF Declared(Test) and (Test>=100)}
{$ENDIF}

// This not:
{$IF Declared(Test)}
{$IF Test>=100} // "E2026 Constant expression expected"
{$ENDIF}
{$ENDIF}

The W1023 can be alleviated by replacing 100 with +100.

Note that both errors have been documented since at least Delphi 2007:

–jeroen

Source: A compiler curiosity I’ve learned today: // This works: {$IF Declared(Test) …

Posted in Conference Topics, Conferences, Delphi, Development, Software Development | 2 Comments »

Finally: RAD Studio August 2018 Roadmap – Embarcadero Community

Posted by jpluimers on 2018/08/07

While many were expecting the 10.3 release by now, it should now be available towards the end of 2018. If that means better quality, I’m all for it [WayBack]: RAD Studio August 2018 Roadmap – Embarcadero Community.

The slides are still in image form (I never understood the lack of PDF), but luckily there is [WayBack] August 2018 Roadmap Commentary from Product Management – Community Blogs – Embarcadero Community.

The 10.3 feature I like most is the work on records: default constructors, destructors and copy operators. This will lead the way for nullable types, on which I gave a session in 2009 on the work I did in the 2007-2009 timeframe on non-generic nullable types, and Jim on generic nullable types:

I never got around to follow up on Reminder: rebuild my Nullable Types based on Class Operators in Delphi, so hopefully the Delphi team will deliver that next year.

Via: [WayBack] Just in: RAD Studio August 2018 Roadmap (https://community.embarcadero.com/article/news/16638-rad-studio-august-2018-roadmap) and PM Commentary blog pos… – Marco Cantù – Google+

–jeroen

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

Delphi unit prefixes for VCL applications

Posted by jpluimers on 2018/08/07

When using 3rd party libraries, not all of them prefix the units they use, so I tend to use this unix prefix list:

System;Xml;Data;Datasnap;Web;Soap;Winapi;System.Win;Xml.Win;Web.Win;Soap.Win;Data.Win;Datasnap.Win;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;

Note that it leaves out ;Bde; as that is a thing from a distant past.

–jeroen

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

Shouldnt this line be null terminated? HostEnt := gethostbyname(MarshaledASt…

Posted by jpluimers on 2018/08/07

[WayBackShouldnt this line be null terminated? HostEnt := gethostbyname(MarshaledAString(TEncoding.UTF8.GetBytes(Name))); – G+ – Allen Drennan

Yes it should, but I’m not sure if the compiler is fully to blame as GetBytes does not return a terminating zero byte.

–jeroen

Posted in Delphi, Development, Encoding, Software Development, UTF-8, UTF8 | Leave a Comment »

One more reason to disable live bindings: it throws exceptions when a project is in a project group having multiple projects upon project group load

Posted by jpluimers on 2018/08/02

This was Delphi Berlin, but Live Bindings is not much better in any other Delphi version when opening a project group having multiple applications none of which use Live Bindings:

This is how you disable them in Delphi 10.1 Berlin from the console; modify your BDS version and BPL version for other Delphi versions:

reg add "HKEY_CURRENT_USER\Software\Embarcadero\BDS\18.0\Disabled Packages" /v "$(BDSBIN)\dclbindcomp240.bpl" /t REG_SZ /d "Embarcadero LiveBindings Components" /f
reg add "HKEY_CURRENT_USER\Software\Embarcadero\BDS\18.0\Disabled Packages" /v "$(BDSBIN)\dclbindcompfmx240.bpl" /t REG_SZ /d "Embarcadero LiveBindings Components FireMonkey" /f
reg add "HKEY_CURRENT_USER\Software\Embarcadero\BDS\18.0\Disabled Packages" /v "$(BDSBIN)\dclbindcompvcl240.bpl" /t REG_SZ /d "Embarcadero LiveBindings Components VCL" /f
reg add "HKEY_CURRENT_USER\Software\Embarcadero\BDS\18.0\Disabled Packages" /v "$(BDSBIN)\dclbindcompdbx240.bpl" /t REG_SZ /d "LiveBindings Expression Components DbExpress" /f
reg add "HKEY_CURRENT_USER\Software\Embarcadero\BDS\18.0\Disabled Packages" /v "$(BDSBIN)\dclbindcompfiredac240.bpl" /t REG_SZ /d "LiveBinding Expression Components FireDac" /f

(Reminder to self: modify bitbucket.org/jeroenp/wiert.me/src/tip/Native/Delphi/Scripts/List-Delphi-Installed-Packages.ps1 so it can generate these)

Edit: I have done just that: it now understands the GenerateDisablePackagesScriptparameter so it generates a small console script to disable various packages.

In QualityCentral: 144003 – Automated Incident Report:

Read the rest of this entry »

Posted in Delphi, Development, Live Bindings, Software Development | 2 Comments »

Just curious whether anyone has had experience with the Uses Cleaner written by Oleg Zhukov…

Posted by jpluimers on 2018/08/02

Reminder to self: see if there was follow-up on [WayBack] Just curious whether anyone has had experience with the Uses Cleaner written by Oleg Zhukov: http://www.olegzhukov.com/UsesCleanupceaf.zip?fileticket=R_… – Bill Meyer – Google+

File: [WayBackhttp://www.olegzhukov.com/UsesCleanupceaf.zip?fileticket=R__cxggc2OA%3d&tabid=73&mid=402

–jeroen

Posted in Delphi, Development | 1 Comment »

Interesting channel with a truckload of Firemonkey FMX demos: Quark Cube – YouTube

Posted by jpluimers on 2018/08/01

[Archive.is] Quark Cube – YouTube:

We create tutorials. And all this without the usual stuff. We want to show how you can work with FireMonkey. Our tutorials are not available as source code. We want to show you a look more, and yes, we do it. Fast, reliable, targeted, unambiguous and ahead of its time. We love Delphi with FireMonkey. #ILoveDelphi

The vides are at [Archive.is] (70) Quark Cube – YouTube

Via Dave Nottage

–jeroen

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

On my research list: FastMM4 LogAllocatedBlocksToFile to help find pseudo “leaks”: allocations released at application end, but during run-time progressively increase memory usage

Posted by jpluimers on 2018/08/01

From a quick scan for LogAllocatedBlocksToFile, I found these links I need to dig deeper into:

This in oder to spot “leaks” at run-time that are being release at process end, but build up memory usage over time. Some might call them “live leaks”.

Basically this is a technique I used a long time ago when I wrote a memory allocation dumper and parsing tool combination in the Turbo/Borland Pascal era called “Korsakov” (I might even have updated that to Delphi 1 once, but soon in Delphi better tools became available).

Another tool that might help here is [WayBackGitHub – yavfast/dbg-spider: Spider – Delphi profiler with docs at [WayBack] Spider – Delphi profiler:

–jeroen

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

Don’t expect high floating point performance from the Delphi for Linux compiler

Posted by jpluimers on 2018/07/31

Don’t expect high floating point performance of the Delphi for Linux compiler as this thread proves it is not: [WayBack] Based on a recent post here, it looks like the new Linux compiler uses the x87 unit for floating point. Naturally this won’t perform well. If it is true… – David Heffernan – Google+

–jeroen

Posted in Delphi, Delphi 10.2 Tokyo (Godzilla), Development, Software Development | 5 Comments »

RAD Studio 10.2.2 Annoying New Features. Help? – Forum – Embarcadero Community

Posted by jpluimers on 2018/07/24

Does anybody know a shorter, more permanent solution for [WayBackRAD Studio 10.2.2 Annoying New Features. Help? – Forum – Embarcadero Community.

Especially the first one is very important to me.

Ever since Delphi introduced IDE layouts, it would remember the last one selected. With Delphi 10.2.2 Tokyo not so any more: it ALWAYS starts with an imposed “Startup Layout”. If you delete it, it re-appears.

I have a carefully named set of layouts that depends on the monitors I am using.

The workaround – every time I switch monitors, at least a few times a day, especially when moving between places, for instance for meetings – is this:

  1. Start Delphi 10.2.2 Tokyo
  2. Select the layout for that monitor
  3. Save it as “Startup layout”

Then each time I tweak a layout, I have to remember to save it both as “Startup layout” and as the actual named layout.

The really dumb thing is that RSP-20138 Can not define default Startup layout is classified as

“Jira-Quality Sync Service added a comment – 29/May/18 2:50 AM
Issue is reclassified as ‘New Feature'”

Via [WayBack1, WayBack2] So Embarcadero broke the “Default layout” (now always enforces a new “Standard Layout”) upon IDE startup in 10.2 Tokyo, and commented on the bug report … – Jeroen Wiert Pluimers – Google+ which has quite a few nice comments and links, including:

Read the rest of this entry »

Posted in Delphi, Delphi 10.2 Tokyo (Godzilla), Development, Software Development | 3 Comments »