Page 1 of 1

DCGET ... VALID with DC_ReadGuiEvent(DCGUI_EXIT_ABORT)

Posted: Fri Oct 11, 2013 1:47 am
by Tom
If GETs have VALID-Codeblocks, they are not evaluated if <ESC> is pressed or the dialog is closed using the 'X'-button of the window. Unfortunately, nearly all my dialogs have buttons created with the BUTTONS-clause of DCGET OPTIONS, one "OK"-button and one "ABORT"-button. The "ABORT"-button simply fires "DC_ReadGuiEvent(DCGUI_EXIT_ABORT,GetList)" (in most of the cases). This leads to an evaluation of the "VALID"-codeblock, if a GET has focus in this situation. I know the reason for this - the GET loses focus, and the buttons are normal buttons at least, so evaluating "VALID" is correct.

Any ideas (besides changing all VALID-codeblocks)?

Re: DCGET ... VALID with DC_ReadGuiEvent(DCGUI_EXIT_ABORT)

Posted: Fri Oct 11, 2013 4:24 am
by skiman
Hi Tom,

I'm a bit confused. You have to add CARGO 'CANCEL' to your cancel buttons. But I'm so surprised you don't know this, that I'm wondering if I did understood your question well.

Re: DCGET ... VALID with DC_ReadGuiEvent(DCGUI_EXIT_ABORT)

Posted: Fri Oct 11, 2013 4:56 am
by Tom
Hi, Chris.
You have to add CARGO 'CANCEL' to your cancel buttons.
Right. This is it! Thanks!
But I'm so surprised you don't know this, that I'm wondering if I did understood your question well.
Seems like I simply missed this. Ask me anything about eXpress++. Anything else. ;)

Re: DCGET ... VALID with DC_ReadGuiEvent(DCGUI_EXIT_ABORT)

Posted: Wed Oct 16, 2013 6:59 am
by rdonnay
I think that it would be a good idea to add that as a default.