简体   繁体   English

帧上的TMultiView会导致AV

[英]TMultiView on Frame causes AV

When placing a TMultiview control on a frame and trying to re-open that frame in the IDE causes an AV and unable to view it. 在帧上放置TMultiview控件并尝试在IDE中重新打开该帧时会导致AV无法查看。

It is a known issue and reported to EMB. 这是一个众所周知的问题,并向EMB报告。 The issue has been reported to the new Quality Portal here: https://quality.embarcadero.com/browse/RSP-9621 . 此问题已在新的质量门户网站上报告: https//quality.embarcadero.com/browse/RSP-9621 Note that you need to be logged on to view this report. 请注意,您需要登录才能查看此报告。 For those that don't have an account, here is what the report looks like as of the time of writing: 对于那些没有帐户的人,以下是截至编写本报告时的情况:

在此输入图像描述

Does anyone know of a workaround, or can come up with a workaround? 有没有人知道解决方法,或者可以提出解决方法?

There is workaround that will enable you to view and edit that frame, but it involves some manual handling of both .pas and .fmx files 有一种解决方法可以让您查看和编辑该框架,但它涉及对.pas和.fmx文件的一些手动处理

Let's say you have created frame with TMultiView component on it. 假设您已经在其上创建了带有TMultiView组件的框架。

Your .pas file looks like: 您的.pas文件如下所示:

unit Unit3;

interface

uses
  System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, 
  FMX.Types, FMX.Graphics, FMX.Controls, FMX.Forms, FMX.Dialogs, FMX.StdCtrls, FMX.MultiView;

type
  TFrame3 = class(TFrame)
    MultiView1: TMultiView;
  private
    { Private declarations }
  public
    { Public declarations }
  end;

implementation

{$R *.fmx}

end.

and your .fmx file looks like: 和.fmx文件看起来像:

object Frame3: TFrame3
  Size.Width = 561.000000000000000000
  Size.Height = 408.000000000000000000
  Size.PlatformDefault = False
  TabOrder = 0
  object MultiView1: TMultiView
    Size.Width = 250.000000000000000000
    Size.Height = 408.000000000000000000
    Size.PlatformDefault = False
    TabOrder = 0
  end
end

In order to successfully open your frame you have to open both files in some editor like Notepad. 要成功打开框架,您必须在记事本等编辑器中打开这两个文件。 Replace TFrame with TForm in your .pas file class declaration, 在.pas文件类声明中用TForm替换TFrame,

  TFrame3 = class(TForm)

then cut out TFrame specific properties from .fmx file (and store it somewhere because you will need to copy them back after you completed the editing) 然后从.fmx文件中删除TFrame特定属性(并将其存储在某处,因为在完成编辑后需要将它们复制回来)

  Size.Width = 561.000000000000000000
  Size.Height = 408.000000000000000000
  Size.PlatformDefault = False
  TabOrder = 0

Now you can freely open your Frame (Form) in IDE, and do whatever you need with it. 现在,您可以在IDE中自由打开Frame(Form),并随心所欲地执行任何操作。 After you are done, save the files, close them in IDE and again edit .pas and .fmx files in Notepad. 完成后,保存文件,在IDE中关闭它们,然后再次在记事本中编辑.pas和.fmx文件。

  TFrame3 = class(TFrame)

and replace TForm specific properties that IDE inserted with your original TFrame ones 并替换IDE与原始TFrame插入的TForm特定属性

  Left = 0
  Top = 0
  ClientHeight = 480
  ClientWidth = 640
  FormFactor.Width = 320
  FormFactor.Height = 480
  FormFactor.Devices = [Desktop, iPhone, iPad]
  DesignerMasterStyle = 0

I have been dealing with this issue for about a week now, and till today was under the impression that my XE7 installation might be corrupt. 我已经处理了这个问题大约一个星期了,直到今天我的印象是我的XE7安装可能已损坏。 In the mean time, what I did to work around this issue has been to cut the TMultiView with all its children from the .FMX file, open the frame in IDE, and paste . 在此期间,我做了什么来解决这个问题一直是削减 TMultiView及其所有子从.FMX文件,在IDE中打开框架,并粘贴 The only drawback is you have to link events again. 唯一的缺点是你必须再次链接事件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM