TMultiView on Frame calls AV

When you place a TMultiview control in a frame and try to re-open this frame in the IDE, it calls AV and cannot view it.

This is a known issue and is reported by EMB. The issue was reported by the new Quality Portal here: https://quality.embarcadero.com/browse/RSP-9621 . Please note that you must be logged in to view the report. For those who do not have an account, here is what the report looks like at the time of writing:

enter image description here

Does anyone know a workaround or can find a workaround?

+5
source share
2 answers

There is a workaround that will allow you to view and edit this frame, but it uses manual processing of .pas and .fmx files.

Let's say you created a frame with the TMultiView component on it.

Your .pas file looks like this:

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 this:

 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 

To successfully open the frame, you must open both files in some editor, for example, in Notepad. Replace TFrame with TForm in the class declaration of the .pas file,

  TFrame3 = class(TForm) 

then cut the specific TFrame properties from the .fmx file (and save it somewhere because you will need to copy them after editing is completed)

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

Now you can freely open your frame (form) in the IDE and do whatever you need with it. Once you're done, save the files, close them in the IDE and edit the .pas and .fmx files in Notepad again.

  TFrame3 = class(TFrame) 

and replace the special TForm properties that the IDE inserted with your original TFrame

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

I have been dealing with this problem for about a week, and until today I had the impression that my XE7 installation might be damaged. In the meantime, what I did to get around this problem was to cut out the TMultiView all its children from the .FMX file, open the frame in the IDE, and paste. The only drawback is to bind events again.

0
source

Source: https://habr.com/ru/post/1207012/


All Articles