Reputation: 3486
It happened to me, that the Delphi XE6 IDE forgot all of the TFrame
descendants that I created in the past.
More specifically, when I click on Standard -> Frames, the dialog for choosing my frames does not show anymore.
Instead, it shows the following error message:
No frames are available to insert. New frames may be created from the File|New|Other selections..
Is there a way to remedy the situation?
EDIT1 Steps to reproduce are sadly unavailable: I am honestly unsure how this happened, but it did. I think there was maybe a culprit when upgrading from certain versions of Delphi to another. As I did this upgrade multiple times over time, I remember starting the project in Delphi 7, then there were some versions which I don't remember which ones, the last two versions I used were XE2 and until now is XE6.
Edit2 This happens if the frame(s) was(were) created with a Delphi version before XE2.
Upvotes: 11
Views: 5191
Reputation: 799
I had this same issue; the frame contents were not updating correctly and after updating and removing frames a few times it broke. Under the project view I removed all the frames (Right Click remove from project) and added them again (Right Click on Project -> Add)
Upvotes: 1
Reputation: 5658
There seems to be a bug in the IDE. Specifically, IDE offers IOTASourceEditor
interface, which has CreateWriter
method to obtain a IOTAEditWriter
interface.
Some IDE extension may use methods of IOTAEditWriter
interface to (for example) edit content of .dpr file (basically, just a series of .DeleteTo
and .Insert
is enough). Apparently this is somehow forces IDE to corrupt .dproj file.
Upvotes: 0
Reputation: 176
I had this happen; in my case it was far simpler.
I had one fmx project that had some frames and a vcl project that didn't in a single project group (different sub directories).
If I opened a fmx unit and tried to add a frame from the component menu, but had the vcl project as the compile target then I got this message. Changing the compile target to the application that contains the unit I opened and the collection of frames stopped the error.
Upvotes: 0
Reputation: 3486
The reason for the problem is in changes to the .dproj
file when the Firemonkey
framework was added. To distinguish frames made for a vcl
from frames made for fmx
a line was added to the .dproj
files as below. To make the correction to the .dproj
file do as follows:
Close the Delphi IDE.
Open the .dproj
file with a text editor of your choice.
Look up the TFrame
one by one.
Let's suppose the following is your TFrame
section:
<DCCReference Include="Results.pas">
<Form>FrameResults</Form>
<DesignClass>TFrame</DesignClass>
</DCCReference>
The fix is to add the following line into that section:
<FormType>dfm</FormType>
(in fmx
projects the line is <FormType>fmx</FormType>
)
Upvotes: 30