What is the Delphi 10 equivalent to DesignIntf?

1.9k views Asked by At

Just updated the SynEdit RunTime module for Delphi 10.1 Berlin, but now I need to update the DesignTime Module... The Designer units from Delphi XE versions do not appear to be available in 10.1.

What is the recommended Design Editor and Interface module to replace the old Delphi Designers?

I was thinking there would be built-in XAML designers, since the new Delphi supports .NETCore.

Is there an alternate designer to use for FMX and cross-platform projects?

example found... requires FMX.Types unit and a header over the class https://delphihaven.wordpress.com/2013/02/03/writing-a-simple-firemonkey-tlistlayout-implementation/

uses
  System.SysUtils, System.Classes, FMX.Types;

type
  [ComponentPlatforms(pidWin32 or pidWin64 or pidOSX32)]
  TListLayout = class(TControl)

Here's how I changed my headers for XE, Delphi 10 and Firemonkey

(*
Directive           Description
  ------------------------------------------------------------------------------
  LINUX               Defined when target platform is Linux  // FOR KYLIX

  // FOR WINDOWS VERSIONS USE VCL
  WIN32               Defined when target platform is 32 bit Windows
  WIN64               Defined when target platform is 64 bit Windows
  CLR                 Defined when target platform is .NET

  WINVCL // ADDING TO REPRESENT ALL VCL platforms

  // FOR OTHER USE ELSE
  // *)
{$IFDEF WIN32}
  {$DEFINE WINVCL}
{$ELSE}
  {$IFDEF WIN64}
    {$DEFINE WINVCL}
  {$ELSE}
    {$IFDEF CLR}
      {$DEFINE WINVCL}
    {$ENDIF}
  {$ENDIF}
{$ENDIF}

uses
{$IFDEF LINUX} // Kylix is target platform
  QControls,
{$ELSE}
  {$IFDEF WINVCL}
    VCL.Controls,
  {$ELSE} // ALL OTHER PLATFORMS USE FIREMONKEY CONTROLS
    FMX.Controls,
    FMX.Types,
  {$ENDIF}
{$ENDIF}
  System.Classes;

And the new controls start out like this now...

[ComponentPlatforms(pidWin32 or pidWin64 or pidAndroid or pidOSX32)]
TMyCustomComponent = class(TControl)
1

There are 1 answers

7
Rudy Velthuis On BEST ANSWER

Nothing has changed. Your design-time package should require designide.dcp and the necessary runtime package. Designide contains what you need.


Use the Getit Package Manager

But this can be a lot simpler. I just did the following:

  • In the IDE, selected Getit Package Manager from the Tools menu.
  • Searched for Synedit
  • Found Synedit Turbo Pack and clicked Install
  • A dialog popped up. I clicked agreement and it went on installing Synedit (although with the old 230 version suffix - this ought to be changed to 240 for Berlin)

After that, I could continue editing what I was editing before this, and the latest Synedit was installed.

SyneditPropertyReg.pas still uses the same units, like DesignIntf, DesignEditors, etc.

Note that now, there are (at least) two packages: SyneditDD.dpk and SyneditDR.dpk. The latter is the runtime package, the former is the designtime package and that should require the runtime package as well as designide. I think the installer compiled a little more, but it went so fast, I couldn't see properly.