Ruslan 5 Posted February 27, 2019 (edited) I use TFrameStand (using Wizard demo), on a frame there are buttons with actions, on destroying the frame a AV error shows up from FMX.Controls TControl.CLick (line 4314) if LAction <> nil then LAction.Target := nil; LAction is not nil but all its members are. Is it a bug or am I doing something wrong? Edited February 27, 2019 by Ruslan Share this post Link to post
Ruslan 5 Posted February 27, 2019 3 minutes ago, Ruslan said: I use TFrameStand, on a frame there are buttons with actions, on destroying the frame a AV error shows up from FMX.Controls TControl.CLick (line 4314) if LAction <> nil then LAction.Target := nil; LAction is not nil but all its members are. Is it a bug or am I doing something wrong? Solved that by adding folowing code into buttons' actions TDelayedAction.Execute(50 , procedure begin // action code end ); Share this post Link to post
Andrea Magni 75 Posted February 28, 2019 Hi @Ruslan, if you are freeing (closing) the frame (frameinfo) within an event handler of an UI element you may need to wait some amount of time in order to let the UI finish its activities related to the event itself (i.e. if it's a button, there might be some animations going on and/or similar things). Sincerely, Andrea 1 Share this post Link to post