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

Archive for the ‘Delphi’ Category

Delphi and the joy of Compiler Intrinsics – I cant use “Length” as a TFunc…

Posted by jpluimers on 2017/04/18

One of the reasons I favour using RTL based functionality over Delphi Intrinsic Routines like Length, Abs and others is that you cannot use compiler intrinsics in Generics. For instance Length is not compatible with TFunc<string, Integer> unless you declare it yourself like function StringLength(value: string): Integer; as otherwise you get en E2029 error (in this case the cryptic '(' expected but ';' found).

It’s one of the many areas where the Delphi compiler developers took a shortcut, but in this case I think the results are somewhat good.

Other reasons for using the RTL over compiler intrinsics have to do with scoping: the intrinsics are in the global scope which can clutter what you’re trying to work on.

So I much rather use the file and stream related functions when I’m actually working with a file or stream. For instance Assign for me has nothing to do with a file outside of a file context (it’s the reason AssignFile exists in the first place).

–jeroen

via: I cant use “Length” as a TFunc (tested in XE and XE6), but if…

Posted in Conference Topics, Conferences, Delphi, Delphi 10 Seattle, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Delphi XE8, Development, Event, Software Development | 1 Comment »

When Delphi is missing the `ActiveX` items in the `File -> New` dialog

Posted by jpluimers on 2017/03/29

Marco Cantú posted the below solution when ActiveX is missing in your File -> New dialog which I’ve paraphrased:

OK, you can try this.

  1. Close RAD Studio/Delphi.
  2. Open the registry editor.
  3. Under HKEY_CURRENT_USER, open the Known IDE Packages\Delphi — that is something like HKEY_CURRENT_USER\SOFTWARE\Embarcadero\BDS\18.0\Known IDE Packages\Delphi
  4. Search for the delphicompro240.bpl, entry
  5. Edit it: remove the __ (double-underscore) pre-pended to the value (Untitled). In other word, change “__(Untitled)” into “(Untitled)“.
  6. Close registry editor.
  7. Open the IDE.

I ran it it recently and was glad this worked.

–jeroen

Source: Hey! I have a new Delphi :)…Great!  And what to do now with my favorite…

Posted in Delphi, Delphi 10.1 Berlin (BigBen), Development, Software Development | Leave a Comment »

Poor man’s MMX: Delphi Live Templates for creating a property with a type which will auto- create the getter/setter

Posted by jpluimers on 2017/03/23

Delphi Live Templates for creating a property with a type which will auto- create the getter/setter: [XML] ipropgs – Pastebin.com by Oliver Münzberg.

For when you think you can beat Model Maker Code Explorer.

via: Do any IDE add-ins have “interface completion”? I figure somebody must have done this by now? David Nottage – Google+

 

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

Kylix: The Real Lowdown – I wrote this in 2000 too

Posted by jpluimers on 2017/03/23

A while ago – while researching yesterdays post – I came across the below article that I wrote back in august 2000 for The Delphi (by Pinnacle Publishing – long gone by now) and on-line at http://www.delphidevelopernewsletter.com/dd/DDMag.nsf/WebIndexByIssue/B8FC16D8103A3760852568F600559A83

I found a cached copy first at http://www.txsz.net/xs/delphi/2/%E6%8A%80%E5%B7%A7%E5%8F%8A%E7%BB%8F%E9%AA%8C/KYLIX%EF%BC%9A%20%E7%9C%9F%E7%9B%B8.HTM and back-tracked from there.

Since the wayback machine isn’t indexed, I salvaged the copy below.

On the Delphi Tokyo release yesterday [WayBackTokyo is available today! – Martin Sedgewick – Google+: I will only try that after Update 1 is released, but based on the [WayBackWhat’s New – RAD Studio:

Like

  • Reintroduction of Linux support. Finally.
  • 64-bit as target: server side, the 32-bit days have been over for a long time
  • one-based strings (boy, I’m glad they didn’t continue on the zero-based strings they did on mobile)

Dislike

  • No openSUSE support where SuSE was the primary partner during Kylix development and launch, just search SuSE kylix; heck the registration guide is still up at [WayBackSDB:Kylix – openSUSE
  • LLVM compiler as it is way too slow for my development cycles
  • ARC based

Time will tell if it works better for me than the .NET Core for Linux I’ve been using until now.

–jeroen
Read the rest of this entry »

Posted in *nix, Delphi, Development, History, Kylix, Linux, openSuSE, Power User, Software Development, SuSE Linux | 4 Comments »

Kylix: Delphi for Linux is on the Way! – I wrote this in 2000

Posted by jpluimers on 2017/03/22

Last year, when Warren Postma wrote, I started digging for some articles I wrote about Kylix (the Delphi for Linux at the start of this century).

The second article I found (Delphi for Linux is on the Way!) was actually the first one I wrote, so I’ve put the copy below. The second article will be in my blog tomorrow.

The article below first appeared at the Pinnacle Publishing site at http://www.pinpub.com/delphi/kylix1.htm as an article for “Delphi Developers Journal” that went out of business just like “Hardcore Delphi” and “Delphi Informant Magazine” went before (actually Blaise Pascal Magazine is about the only Delphi related magazine left).

I found the title of my article through http://www.newsmth.net/bbsanc.php?path=%2Fgroups%2Fcomp.faq%2FDelphi%2FAboutDelphi%2FKylix%2FM.967808208.A then back-tracked the title via http://www.inner-smile.com/delphin.phtml

–jeroen

Read the rest of this entry »

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

GExperts – when your predecessor has put it under the Tools menu

Posted by jpluimers on 2017/03/21

I totally forgot that GExperts can be under the Tools men

GExperts IDE configuration

GExperts IDE configurationu (I’m so accustomed that Alt-X is GExperts and Alt-M is ModelMaker Code Explorer).

These keyboard shortcuts are only assigned when you install GExperts before you install ModelMaker Code Explorer.

If you reverse, then you have to fiddle by removing the ModelMaker Code Explorer expert, then re-add it.

Anyway: you can configure this in the “IDE” tab of the GExperts Configuration.

After that you have to restart the Delphi IDE to reflect the change.

–jeroen

Source: GExperts Help

Posted in Delphi, Development, GExperts, Keyboards and Keyboard Shortcuts, ModelMaker Code Explorer, Power User, Software Development | 2 Comments »

Display and edit keyboard macros with GExperts – twm’s blog

Posted by jpluimers on 2017/03/13

Yes!

The GExperts Macro Library expert can now display and edit keyboard macros that have been recorded in the Delphi IDE.

Thomas did some great work on GExperts. Again.

Source: [WayBackDisplay and edit keyboard macros with GExperts – twm’s blog

Via: [WayBack] The GExperts Macro Library expert can now display and edit keyboard macros that have been recorded in the IDE. – Thomas Mueller (dummzeuch) – Google+

–jeroen

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

Using Delphi nextgen compilers … https://xkcd.com/303/ some arguments to have both for the Win32 platform

Posted by jpluimers on 2017/03/08

Last week there was a nice poke by Stefan Glienke around the Delphi nextgen compiler being used for the upcoming Intel x64 Linux support in Delphi (yes, no Arm there, hopefully somewhere in the future) at [Archive.isUsing Delphi nextgen compilers … https://xkcd.com/303/

It resulted into a nice thread of strengths and weaknesses of the classic and nextgen compilers.

I’m emphasising a long term wish for the Win32 platform to have two compilers: a classic one and an LLVM nextgen one.

Reasons include this:

  • Various compiler architectures can emit code for the same end-platformm: Kylix Linux x86 support uses the classic compiler, new Linux x64 support is using the LLVM nextgen compiler
  • Debugging non-Win32 (x86 on Windows) is slow and buggy at best
  • LLVM nextgen compiler takes about 2 orders of magnitude longer than the classic compiler
  • the classic compiler has various optimisation deficits for about 2 decades and won’t be fixed
  • the LLVM nextgen compiler has many more optimisation opportunities than the classic compiler
  • the LLVM nextgen compiler supports zerobased strings and ARC which are almost impossible to debug because of the debugger issues so writing truly cross platform code using Delphi is a drag

So, please please please Delphi team: provide an LLVM nextgen compiler for the Win32 platform.

via: [Archive.isUsing Delphi nextgen compilers … https://xkcd.com/303/

Recommended video: [WayBack] The recent next gen compiler debate reminded me of this nice talk.This is about c++ but it shows off nicely what a high quality compiler can achieve in terms of optimisation… – Christoph Hillefeld – Google+

–jeroen

Read the rest of this entry »

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

The IDE Fix Pack 5.95 is compatible with Delphi 10.1 Update 2

Posted by jpluimers on 2017/03/03

Yes it is compatible: [WayBackAndreas‏ @AndyHTech: Following More Why is there no #IDEFixPack for #Delphi Berlin 10.1 Update 2 ? Just use the one that was released for the RTM version, it works for Up1&Up2.

via: David Heffernan on [WayBack] Is the IDE Fix Pack 5.95 compatible with Delphi 10.1 Update 2? I mean it’s not explicitly mentioned so I’m assuming not, but I’m asking just in case.I… – Asbjørn Heid – Google+

–jeroen

Posted in Delphi, Delphi 10.1 Berlin (BigBen), Development, Software Development | Leave a Comment »

New book by +Nick Hodges tech preview by +Stefan Glienke – dependency injection in delphi

Posted by jpluimers on 2017/02/28

[WayBack] New book by +Nick Hodges tech preview by +Stefan Glienke https://leanpub.com/dependencyinjectionindelphivia Jeroen Wiert Pluimers – Google+:

This book covers Dependency Injection from A to Z.  In it you’ll learn about Constructor Injection, Property Injection, and Method Injection.  You’ll learn about the right and wrong way to use the Dependency Injection Container.

Source: Dependency Injection In Delphi by Nick Hodges [Leanpub PDF/iPad/Kindle]

This is the Chapter List:

  • What is Dependency Injection
  • Benefits of Dependency Injection
  • Constructor Injection
  • Property Injection
  • Method Injection
  • Using the Container
  • A Simple Migration Example
  • Advanced Uses of the Container
  • Dependency Injection Anti-patterns
  • A Full, Useful Example
  • Final Thoughts

–jeroen

Source: New book by +Nick Hodges tech preview by +Stefan Glienke https://leanpub.com/…

Posted in Delphi, Delphi 10 Seattle, Delphi 10.1 Berlin (BigBen), Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Delphi XE8, Development, Software Development | Leave a Comment »