The Wiert Corner – irregular stream of stuff

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

  • My work

  • 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,811 other followers

Archive for the ‘Delphi 10 Seattle’ Category

If you ever wonder why you get no (or incomplete) RTTI from a control that you…

Posted by jpluimers on 2017/08/08

Thanks Stefan Glienke for posting this a while ago:

If you ever wonder why you get no (or incomplete) RTTI from a control that you inherited from a DevExpress one – then look into cxVer.inc where it has the following lines:

{$IFNDEF CXTEST}
{$WEAKLINKRTTI ON}
{$RTTI EXPLICIT METHODS([]) FIELDS([]) PROPERTIES([])}
{$ENDIF}

+Martin Wienold was wondering (and so was I at first) why he could not properly resolve a form from the DI container that inherited from TdxRibbonForm despite writing a public method with [Inject] attribute on it but it was never called.

Warning: If you are using DevExpress or any other source code that does this (changing the $RTTI directive) and build these sources together with your application (in contrast to using precompiled dcus or even packages) on a version <XE6 then you might suffer from this issue: [WayBack] #79943: {$ RTTI} flag scope which causes RTTI to disappear even from units that did not have the $RTTI in them.

Source: If you ever wonder why you get no (or incomplete) RTTI from a control that you…

 –jeroen

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

When someone writes UTF-8 and UTF-16 strings to the same file in binary format without converting between them…

Posted by jpluimers on 2017/06/21

A while ago, I had to fix some stuff in an application that would write – using a binary mechanism – UTF-8 and UTF-16 strings (part of it XML in various flavours)  to the same byte stream without converting between the two encodings.

Some links that helped me investigate what was wrong, choose what encoding to use for storage and fix it:

–jeroen

Posted in Delphi, Delphi 10 Seattle, Delphi 10.1 Berlin (BigBen), Delphi XE8, Development, Software Development | 3 Comments »

UsesHelperSetup.zip by Stefan Glienke for Delphi 10.0/1/2

Posted by jpluimers on 2017/05/25

[WayBack] Some while ago I started a plugin to easily add units to the uses clause just like you can do via quickfix in VisualStudio.I never actually polished it… – Stefan Glienke – Google+

UsesHelperSetup.zip download: https://1drv.ms/u/s!ArjIoB43KhwDg3Ju1tkHlJniN2WS (for now Delphi 10, 10.1 and 10.2: Seattle/Atlanta, Berlin/Big-Ben, Tokyo/Godzilla)

jeroen

 

Posted in Delphi, Delphi 10 Seattle, Delphi 10.1 Berlin (BigBen), Delphi 10.2 Tokyo (Godzilla), Development, Software Development | Leave a Comment »

Delphi Corner Weblog: New: Velthuis.AutoConsole unit – helps against the “optimised” Embarcadero FastMM fork.

Posted by jpluimers on 2017/05/17

Brilliant:

if it is a console program and it was started any other way (from the Windows Explorer, from the Delphi IDE with or without debugger, from another non-console program), then, before the console window can close, it will display:

Press any key...

Source: Delphi Corner Weblog: New: Velthuis.AutoConsole unit [WayBack]

via:

–jeroen

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

FMX.Dialogs basically blocks mixing VCL with FMX…

Posted by jpluimers on 2017/04/27

Nice find:

Stefan Glienke+4

Look into the initialization block of FMX.Dialogs. The call to ActivateClassGroup(TFmxObject); turns off all the TRegGroups that don’t contain at least one type that inherits from TFmxObject which also happens to be the group that you register your form class to. GetClass then ignores such groups.

I don’t have the slightest idea what the intention behind all that code is but it certainly is one of the reasons why you cannot mix FMX and VCL officially.

In response to:

I have an VCL application. I need to register some form classes at run time. This is done in the form’s unit implementation section :

Initialization

If GetClass(‘TfmConnectiondialog’) = Nil Then
Classes.RegisterClass(TfmConnectiondialog);

Suddenly my class wasn’t registered anymore. GetClass(‘TfmConnectiondialog’) was always nil and Classes.RegisterClass had no effects.

After some long search, I’ve found that I’ve inadvertently added an FMX.Forms in one of my unit. This was the culprit. Replacing FMX.Forms with VCL.Forms solved my problem.

Behaviour is really strange, why Classes.RegisterClass didn’t throw any exception ? Is this a “Bug” or is this “as expected” ?

–jeroen

Source: Hello, I have an VCL application. I need to register some form classes at ru… [WayBack]

Posted in Delphi, Delphi 10 Seattle, Delphi 10.1 Berlin (BigBen), Delphi XE7, Delphi XE8, Development, Software Development | 1 Comment »

 
%d bloggers like this: