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

Starting your Delphi VCL app meanwhile your mouse is moving, no accelerators are shown (Menu, button, focus rect missing… etc.) same when clicking a button to open a new form

Posted by jpluimers on 2018/07/24

Problem (D2007 and up)

If you are starting your Delphi VCL app meanwhile your mouse is moving, no accelerators are shown (Menu, button, focus rect missing… etc.)

Something similar happens when you click on a button which opens a new form, somehow UI State becomes a state which is wrong.

Solution

In a detoured Form.DoShow(Or in every OnShow event) :Self.Perform(WM_CHANGEUISTATE, MakeLong(UIS_CLEAR, UISF_HIDEACCEL or UISF_HIDEFOCUS), 0);

  • No repaint penalty
  • no flicker
  • accels
  • focus rect are always shown
  • system is not touched.

Source: [WayBackSo, here is the thing…If you are starting your Delphi VCL app meanwhile your mouse is moving, no accelerators are shown (Menu, button, focus rect mis… – Attila Kovacs – Google+

Related: [WayBackc# – Show Hotkeys at All Times – Stack Overflow

–jeroen

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

Delphi Community Edition available: good move for Embarcadero, but be careful how much revenue you make

Posted by jpluimers on 2018/07/19

On [WayBack] Delphi Community Edition available: – Uwe Raabe – Google+, the links to the [WayBackEULA, [WayBack] FAQ and [WayBack] Feature Matrix were shared.

In summary (read the G+ thread for more), the Delphi Community Edition is a web-installer of version 10.2.3 feature equivalent to the Delphi Professional Edition.

I think it is a good move to make Delphi more accessible to many more people.

A few restrictions apply, for instance there is also a C++ Builder Community Edition equivalent to the C++ Builder Professional edition, but you cannot install them on the same system at the time time.

Also, you cannot move around the command-line compiler to a different system (for instance a build-machine for Continuous Integration purposes).

The financial restriction that applies can be summarised as this: When the revenue you make during the year exceeds USD 5000 you have to stop using the Community Edition license.

Note that this is about revenue, not about income (which many define as “net of revenues and expenses”), and does not mention the revenue source, so watch this during the years you use the Community Edition.

Furthermore, Embarcadero indicates they collect information about your use of the Community Edition, but the [WayBack] privacy statement is not clear how.

All in all I hope this move attracts fresh people into the Delphi community.

The heise – the German flagship IT journal – likes it too: [WayBack] Delphi und C ++ Builder als Community Edition | heise Developer (via [WayBack] Some nice PR … Embarcadero-konfektioniert-Delphi-und-C-Builder-als-Community-Edition-4115563… – Roland Kossow – Google+)

Edit 20180927

Yes, Embarcadero is going after your employer if you register Delphi Community with a corporate email address.

See [WayBack] Embarcadero wants me to pay for a download. : legaladvice – Joseph Mitzen – Google+ and [WayBack] Embarcadero wants me to pay for a download. : legaladvice

–jeroen

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

ColorButton unit with TColorButton saved for posterity as http://delphi.about.com got hi-jacked.

Posted by jpluimers on 2018/07/18

Hopefully my blog will last longer than the original delphi.about.org articles.

Last year, I noticed yet another path into bit rot: [WayBack] The title reads “Source Code for the TColorButton Delphi Component”… I must be going blind because I can’t find it – Thomas Mueller (dummzeuch) – Google+

In this case, http://delphi.about.com/library/weekly/aa061104a.htm got redirected via http://delphi.about.com/od/vclusing/fl/Source-Code-for-the-TColorButton-Delphi-Component.htm to [WayBackhttps://www.thoughtco.com/source-code-for-tcolorbutton-4077901 which is a copy of the original article failing to preserve the download links of the original source code.

It doesn’t help that the original source download at http://delphi.about.com/library/code/ncaa061104a.htm also redirects to https://www.thoughtco.com/delphi-programming-4133475 a generic catch all of [WayBackDelphi Programming where http://delphi.about.com also redirects to.

In other words:

http://delphi.about.com got hi-jacked.

So here are some links to various forms of that source code:

–jeroen

Posted in Color (software development), Delphi, Development, Software Development | 2 Comments »

From the bragging “Did you know the IDE starts almost twice as fast in 10.2.2 as it did in 10.1?”

Posted by jpluimers on 2018/07/17

An interesting discussion sprouted from the bragging [WayBack] Did you know the IDE starts almost twice as fast in 10.2.2 as it did in 10.1? https://community.embarcadero.com/blogs/entry/new-in-10-2-2-welcome-page-… – David Millington – Google+.

I do not care very much about IDE start times (Visual Studio starts faster, others like Android Studio start slower than Delphi), more about productivity.

Which means loading projects, opening files and forms, switching projects, etcetera need to be fast and stable.

For me this is when on Delphi projects, I start about half a dozen copies of Delphi about 10 seconds apart (otherwise you get exceptions in any Galileo version), make some tea, then come back.

Each time an IDE crashes, I kill it, start a new one, switch to an existing one, load the projects I need and continue. On a full day working with Delphi, this happens about a dozen times a day.

After that I want to be productive.

Here is where I was so surprised by the great tip from Yusuf Zorlu

+Asbjørn Heid you should try to disable all “livebinding” packages + rename dclbindcomp250.bpl . If i opened a form before i had to wait 20 to 40 seconds … now it is superfast and opens forms under 5 seconds. I don’t need LiveBindings …

and the response by Asbjørn Heid

+Yusuf Zorlu Thank you! Holy cow that’s a difference! As you say, even our most complex forms are down to 4 seconds now.

I never use LiveBindings as they are way to convoluted, unstable and result in logic being in designers as opposed to tool-manageable code.

In addition, LiveBindings have never been really optimised since their inception in Delphi XE2.

This saves a lot of time!

So one day, I need to update Source: Delphi packages I have disabled by prefixing their description with an underscore (and why) and create a batch file with the various [WayBack] reg add commands modifying the package loads.

Related:

–jeroen

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

GExperts “Set Component Properties”

Posted by jpluimers on 2018/07/17

I totally forgot about [Archive.isGExperts Help: Set Component Properties

The main reason is that I hardly use any live connections in Delphi applications any more for mainly two reasons:

  • timing issues (varying from taking way too long to open something, via order what needs to be opened different between run-time and design-time, to )
  • pushing business logic further away from the user interface so it is easier to automatically test the business logic

But once every while I’m on a new site that has their own tool-chain installed and I see screens like this one:

I’m not alone on this: [WayBack] Does anybody know where the following dialog window come from? I need to disable it but failed to find the source IDE plugin – Edwin Yip – Google+

The good thing is that it can bring certain components into a know state before compiling your application.

But this is a thing your CI environment should already do for you.

–jeroen

 

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

CodeRage 8 replays: REST stuff

Posted by jpluimers on 2018/07/12

It seems I forgot to schedule this post, as it was still in the drafts.. So here it is for historic purposes. Likely a few links have died by now.

Last year I could not make it to CodeRage 8 as I was prepping for EKON 17 and ITDevCon 2013.

But there were some nice presentations, some of which I really wanted to see again.

So I was glad to have found the CodeRage 8 Replayshttp://www.youtube.com/playlist?list=PLwUPJvR9mZHiaYvH9Xr7WuFCVYugC4d0w.

Especially for these sessions as REST support is an under-marketed aspect of Delphi XE5:

And a few others as well:

–jeroen

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

Delphi TList.Grow and TStringList.Grow perform differently

Posted by jpluimers on 2018/07/12

Just as a reminder to self: the non-generic TStringList and TList grow way less aggressive than the generic TList:

  • TList.Grow and TStringList.Grow:
    • 4, 8, 12, 28, 44, 60, 76, 95, 118, 147, 183, 228, 285, 356, 445, 556, 695, 868, 1085
  • Generic TList growth via TListHelper.InternalGrow:
    • 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024

Sources:

–jeroen

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

Delphi – pressing Ctrl-A on a TDBEdit was partially fixed in Delphi 10.2 Tokyo

Posted by jpluimers on 2018/07/11

[WayBack] QualityCentral 110308 – TDBEdit updates wrongly Datalink.Modified when Dataset being in Browse mode and [WayBack] QualityCentral 127300 – Closed Exception When Ctrl+A (select text) on TDBEdit have been partially fixed in Delphi 10.2 Tokyo under [RSP-16288] Bug after selecting all the text by pressing Ctrl+A in TDBEdit and pressing TAB – Embarcadero Technologies.

Since there is only manual syncing from Quality Portal to Quality Central, and only Quality Central is indexed by search engines, the public at large usually finds the Quality Central bugs.

Basically, the affected controls ([WayBack] TDBEdit, [WayBackTDBComboBox, [WayBack] TDBMemo, but not [WayBackTDBRichEdit – probably not needed as I could not reproduce the [WayBack] TClientDataSet based QC127300 attachment in Delphi 10.1 with TDBMemo or TDBRichEdit, though neither selected of these two all text, which 10.2 also fixes).

the .KeyPress methods now check for a Ctrl-A case like this:

    ^A:
      begin
        SelectAll;
        Key := #0;
      end;

and some of the .KeyDown methods have been tuned a little by setting Key := 0 when Edit returns false.

–jeroen

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

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

listview – TListView detecting ESC or unchanged editing – Stack Overflow

Posted by jpluimers on 2018/07/05

Delphi translation by Thomas Mueller of a C++ Builder fix [WayBack] listview – TListView detecting ESC or unchanged editing – Stack Overflow

Via [WayBack] TListView detecting ESC or unchanged editing – Thomas Mueller (dummzeuch) – Google+

–jeroen

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