I am developing a package of IDE-registered components, most of which are derived from a base TFrame class. There are also various custom dialog forms that are called by these components, included in the package. I'm working in Delphi 2007.
I'm noticing that sometimes frame and form units, which normally have an associated DFM file, do not always show the DFM file "underneath" (accessible via the little [+] treeview node expander) underneath them. If I add an existing form-based PAS file, for instance, via right-clicking on the BPL project (in the Project Manager) -> Add, it doesn't show the DFM file in the listing.
If I Add New, though, and create a new form or frame unit in the project, it shows as the typical nested two-file item in the Project Manager. It also shows that way if I drag an existing form from another project in the Project Group to this BPL project in question.
Seems like this should be consistent, and I prefer both files showing when the unit is a Frame or Form.
Is this indicative of something wrong in the project file? Am I adding existing forms/frames to this package incorrectly? If so, how should I add existing form/frame units so that both files show in the Project Manager listing?
* UPDATE *
From Alen's suggestion below:
I tried adding the {$R *.dfm} directive to the form's unit, and it did not force the DFM file to show up when adding it to my BPL package/project. Adding {$R *.dfm} to the project file itself (which I don't think is what you meant, but I thought I'd try it) didn't work either. Does this technique only work with EXE projects?
Possibly (likely) related, trying to build with that directive in places gives me this:
[DCC Error] E2161 Warning: Duplicate resource: Type 10 (RCDATA), ID TTESTTREEVIEW; File E:\Projects\MyApp\Components\TTestTreeViewFrame.dfm resource kept; file E:\Projects\MyApp\Components\TTestTreeViewFrame.dfm resource discarded.
"Keping" and "discarding" the same file??
Later: It looks like this "duplicate resource" issue MIGHT be related to this. Not certain, but at least in one instance both happened simultaneously.