stacker_liew 5 Posted January 18, 2023 Anyone can help to look for the code? What is the reason av is happen when the login frame is shown, and Back key is click av triggered. TFrameStandDemo.7z Share this post Link to post
programmerdelphi2k 237 Posted January 18, 2023 @stacker_liew if any "AV" is been raised, when you: trying to access an object that was never created in memory; trying to access an object that no longer exists in memory; Share this post Link to post
Dave Nottage 557 Posted January 18, 2023 1 hour ago, stacker_liew said: What is the reason av is happen when the login frame is shown This is the code: unit utTFrameStandDemoLoginFrame; 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.Controls.Presentation, FMX.Objects, FMX.Effects, FrameStand; type TTFrameStandDemoLoginFrame = class(TFrame) TFrameStandDemoLoginFrameRectangle: TRectangle; TFrameStandDemoLoginFrameToolBar: TToolBar; TFrameStandDemoLoginFrameToolBarShadowEffect: TShadowEffect; TFrameStandDemoLoginFrameToolBarLabel: TLabel; TFrameStandDemoLoginFrameToolBarBackSpeedButton: TSpeedButton; procedure TFrameStandDemoLoginFrameToolBarBackSpeedButtonClick(Sender: TObject); private { Private declarations } [FrameInfo] FInfo: TFrameInfo<TTFrameStandDemoLoginFrame>; public { Public declarations } end; implementation {$R *.fmx} procedure TTFrameStandDemoLoginFrame.TFrameStandDemoLoginFrameToolBarBackSpeedButtonClick(Sender: TObject); begin FInfo.HideAndClose; end; I expect it's because FInfo is not being created Share this post Link to post
stacker_liew 5 Posted January 18, 2023 But it's ok in the first frame but not in the second frame. Share this post Link to post
stacker_liew 5 Posted January 26, 2023 On 1/18/2023 at 6:37 PM, stacker_liew said: But it's ok in the first frame but not in the second frame. Finally I managed to solve this problem, by using different FrameStand for different Frame. TFrameStandDemo.7z 1 Share this post Link to post