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;
Interface
Uses
System.Classes,
DesignIntf,
FMX.Editor.Items,
FMX.Design.Items;
Type
TMEEditEditor = Class(TItemsEditor)
Public
Constructor Create(AComponent: TComponent; ADesigner: IDesigner); Override;
End;
Implementation
Uses
FMX.Edit,
ME.Edit;
Constructor TMEEditEditor.Create(AComponent: TComponent; ADesigner: IDesigner);
Begin
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);
End;
End.
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 ;)
I have reported this issue on the Embarcadero QP (RSP-17686)