Jump to content

Can you also please change anonymous proc into function returning TCloseAction.


Recommended Posts

Posted

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.

Posted

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.

×
×
  • Create New...