Delphi:TFrame错误没有可插入的帧 [英] Delphi: TFrame error No frames are available to insert

查看:134
本文介绍了Delphi:TFrame错误没有可插入的帧的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

发生在我身上的是Delphi XE6 IDE忘记了我过去创建的所有 TFrame 后代。

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?

编辑1 可悲的是没有可用的复制步骤:老实说,我不确定这是怎么发生的,但是确实如此。我认为从某些版本的Delphi升级到另一个版本时可能是罪魁祸首。随着时间的推移多次升级,我记得在Delphi 7中启动了该项目,然后有一些版本我不记得是哪个版本,我使用的最后两个版本是XE2,直到现在是XE6。

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 如果在XE2之前使用Delphi版本创建了框架,则会发生这种情况。

Edit2 This happens if the frame(s) was(were) created with a Delphi version before XE2.

推荐答案

问题的原因是更改了 .dproj 添加 Firemonkey 框架时的文件。为了区分 vcl 的框架和 fmx 的框架,在中添加了一行.dproj 文件如下。要对 .dproj 文件进行更正,请按以下步骤操作:

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:


  1. 关闭Delphi IDE。

  1. Close the Delphi IDE.

使用您选择的文本编辑器打开 .dproj 文件。

Open the .dproj file with a text editor of your choice.

逐个查找 TFrame

让我们假设以下是您的 TFrame 部分:

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>
    


  • (在 fmx中预测该行是< FormType> fmx< / FormType>

    这篇关于Delphi:TFrame错误没有可插入的帧的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆