“Cannot create a method for an unnamed component”

后端 未结 2 1386
名媛妹妹
名媛妹妹 2021-02-15 17:22

The following code (when registered in a package) gives us a component called TParentComponent registered in the pallet Test.

However, when you

2条回答
  •  忘了有多久
    2021-02-15 17:45

    A sufficient "workaround" was found on About.com's "Creating Custom Delphi Components, Part 2, Page 4 of 5" article.

    Full sample source is on their article, and works (seemingly) with all versions of Delphi.

    However, it should be noted that this solution isn't perfect as it doesn't allow you to separate the Collection Editor from the Parent and Child components (meaning you have to produce the source for both components to enable the Collection Editor to work, and place that in your runtime package).

    For my needs right now, this will do... but if anyone can find a better solution based directly on the example code posted in my question, that'd be great (and I'll mark that answer as Correct should anyone provide it).

提交回复
热议问题