zilav Posted May 21, 2014 Share Posted May 21, 2014 Can you also please change anonymous proc into function returning TCloseAction. For example when I post some updates into DB when result=mrOk, if there is an error like duplicate index, I want to show a message and prevent closing modal form. To make it work in 0.95 I'm using my own ShowModalCallback() method that stores anon callback inside form and calls it in OnClose event. it works, but would be nice to have a similar functionality built-in. Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted May 21, 2014 Administrators Share Posted May 21, 2014 I can implement it in a future version. Current implementation happens at a stage where form closure can not be cancelled. Link to comment Share on other sites More sharing options...
zilav Posted May 21, 2014 Author Share Posted May 21, 2014 Thanks. My only concern is that such change might break existing applications which for some reason expect a form to be closed at the time of callback's execution. So maybe add an optional parameter to ShowModal (which defaults to False) telling UniGUI to execute callback before closing a form. Or even create a new method ShowModalXXXXX or something for this. Link to comment Share on other sites More sharing options...
Recommended Posts