Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.

Welcome, Guest
Guest Settings

Thread: Building a designtime package blues - dclfmxstd dcp

This question is not answered. Helpful answers available: 2. Correct answers available: 1.

Permlink Replies: 0
Marco Rocci

Posts: 17
Registered: 8/13/13
Building a designtime package blues - dclfmxstd dcp  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 24, 2017 2:20 PM
This has been posted on Stack Overflow a day ago, but has not received any comments or answers yet, so I hope someone here can help. I'm not really sure this would be the right forum, but here goes.

I am using Delphi Berlin Enterprise and I need to extend some functionalities of the TClearEditButton and TDropDownEditButton. So I developed my own TMEClearEditButton and TMEDropDownListEditButton. They are subclasses of the standard FireMonkey ones, so I used the FMX.Edit unit. I did some test by creating the buttons by code and had no problems up to here.

Problems started when I decided to build a designtime only package to have the possibility to add the buttons to edits directly in the IDE. Copying some code from FMX.Editors, I came up with the following:

    Unit ME.Editors;
      TMEEditEditor = Class(TItemsEditor)
        Constructor Create(AComponent: TComponent; ADesigner: IDesigner); Override;
    Constructor TMEEditEditor.Create(AComponent: TComponent; ADesigner: IDesigner);
      Inherited Create(AComponent, ADesigner);
      FAllowChild := False;
      SetLength(FItemsClasses, 10);
      FItemsClasses[0] := TItemClassDesc.Create(TEditButton);
      FItemsClasses[1] := TItemClassDesc.Create(TMEClearEditButton);
      FItemsClasses[2] := TItemClassDesc.Create(TPasswordEditButton);
      FItemsClasses[3] := TItemClassDesc.Create(TSearchEditButton);
      FItemsClasses[4] := TItemClassDesc.Create(TEllipsesEditButton);
      FItemsClasses[5] := TItemClassDesc.Create(TDropDownEditButton);
      FItemsClasses[6] := TItemClassDesc.Create(TMEDropDownListEditButton);
      FItemsClasses[7] := TItemClassDesc.Create(TMEDropDownDateEditButton);
      FItemsClasses[8] := TItemClassDesc.Create(TMEDropDownTimeEditButton);
      FItemsClasses[9] := TItemClassDesc.Create(TSpinEditButton);

Now compiling this requires some standard delphi designtime packages:

- DesignIDE
- fmxdesigner
- dclcommon

... but that does not seem to be enough. It now compiles, but with warning that the following units were implicitly imported into my package:

- FMX.Design.Lang
- FmxDsnConst
- FMX.Editor.Items
- FMX.Design.Items

... and suggesting I should add the dclfmxstd package to the requires list.

If I do so, it won't work because no dclfmxstd.dcp actually exists anywhere on my computer. There is a dclfmxstd240.bpl package library in my 18.0\bin directory, but no dcp compiled package anywhere.

I also tried to copy those 4 units in my development directory and include them explicitly in my package... but that won't work as it states that those units are already included in the dclfmxstd240 package.

Any hints as to how to get out of this empasse and move forward?

PS - As an aside... it would be nice to have a mapping of delphi units to packages so as to know which packages have to be referenced... without using a binary search tool on all the many dcps in Lib ;)
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02