flexdev Posted July 17, 2019 Share Posted July 17, 2019 Hi, in a complex form I have this code : _xScad.ShowModal( procedure (Sender: Tcomponent; AResult: Integer) begin if AResult = mrOk then LoadEvent; end ); Anonymous procedure not execute at showmodal return .... but if change the code to ..... procedure TMainForm.ReLoadData(Sender: Tcomponent; AResult: Integer); begin LoadEvent; end; ... _xScad.ShowModal(ReLoadData); the callback procedure is execute.... in many parts of my code I use anonymous callback procedures and works perfectly .... Thank's for help.... :-) Quote Link to comment Share on other sites More sharing options...
Pep Posted July 17, 2019 Share Posted July 17, 2019 In First Anonymous procedure you are checking if Result = mrOk in the other you didn't check Result Quote Link to comment Share on other sites More sharing options...
flexdev Posted July 17, 2019 Author Share Posted July 17, 2019 no part of the anonymous procedure is execute... Quote Link to comment Share on other sites More sharing options...
Sherzod Posted July 17, 2019 Share Posted July 17, 2019 44 minutes ago, flexdev said: no part of the anonymous procedure is execute... Hi, Which build are you using? Can you make a simple testcase for reproduce?! Quote Link to comment Share on other sites More sharing options...
flexdev Posted July 18, 2019 Author Share Posted July 18, 2019 23 hours ago, Sherzod said: Hi, Which build are you using? Can you make a simple testcase for reproduce?! restarted the pc, clean and rebuild the project .... ... the problem disappeared! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.