Developing new TEditButton types requires dclfmxstd package which does not exist as dcp

后端 未结 1 1735
花落未央
花落未央 2021-01-26 12:34

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 TMEDr

相关标签:
1条回答
  • 2021-01-26 13:11

    I thought I'd post this as an answer because although it doesn't solve your problem in a very satisfactory way, I've at least got as far as deriving an FMX component which I can install in the IDE and which has a custom designer. What I've done might give you some ideas for where next.

    Here's what I've done:

    1. I created a unit containing a minimal descendant of FMX's TEdit, TMyEdit. This uses the following FMX units: FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.Controls.Presentation and FMX.Edit. I also created a separate unit (like you are supposed to) containing a minimal component edit. This unit only uses System.Classes, DesignIntf, FMX.Editor.Items and FMX.Design.Items.

    2. I added both of these units to a new .Dpk project and set its Requires clause to list RTL.DCP, FMX.DCP and FMXDesigner.DCP.

    3. I compiled the .Dpk and attempted to install it. I got the same dialog as you suggesting to add DclFMXStd.DCP to my Requires list. And then, of course, it complained that it couldn't find it.

    4. I searched my entire h/disk for DclFMXStd.* and of course it found nothing apart from DclFMXStd230.BPL, but no counterpart .DCP file.

    5. So then I wondered "Where is it getting the name 'DclFMXStd' from? A Grep search of my Seattle install (which is what I'm using, though I have Tokyo installed to) found that the only file that contains the name is the package file, DclFMXStd230.Bpl, which contains 3 occurrences of it. I confirmed this by running Delphi's TDump utility on the .Bpl.

    6. So then I thought 'What if I uninstall DclFMXStd230.Bpl from the IDE?'. I tried, and Presto, my package now compiles and installs without complaint, Although, of course, the IDE is now devoid of the supplied FMX components.

    So, I think that would be enough to file a legitimate QP report, if I were in your position.

    If you want to reinstate the other FMX components, I suppose you could think about adding them to your package, though you might want to check whether that is allowed under the terms of your Delphi licence.

    The other thing I've been wondering is 'Surely, other FMX authors must have run into this problem, despite google only finding your SO posts? So it might be worth tracking down a preferably-freeware FMX library with source and looking at how the authors solve or avoid the problem.

    Good luck!

    0 讨论(0)
提交回复
热议问题