View Full Version : Possible to cancel requester close?

07-10-2011, 07:27 PM
Is it possible to cancel a requester close/unload when the user clicks the OK or Cancel button on the requester and then subsequently reopen the same requester?

Say for validation of input I want to unpost and force them to re enter data or click cancel instead. How is this achieved?

thanks :)

07-11-2011, 03:13 AM
I doubt you can cancel it. But you can always reopen. Just put all the gui code in a separate function, return the reqpost return value from it, and just call that function in a loop or whatever.

But if you just want to validate you can also do that interactively by attaching ctlrefresh callbacks to the controls and check the values immediatly as they are input. You'll likely want to highlight the controls with erroneous inputs using draw functions. You could assign all controls to the same ctlrefresh callback and check all inputs always. Put a requpdate at the end to force redraw to show where any errors lie (this step maybe not necessary; don't remember).

If you want a real non-modal panel, you can only create those in Layout, using reqopen(), instead of reqpost(). (Atleast this has always been the case. Maybe different now).

07-11-2011, 04:25 AM
Thanks I suspected so, just wondered if there was something I was missing. I'll do it that way then.