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.... :-) 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 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... 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?! 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! Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now