PDA

View Full Version : UserError



Peter van Mil
8-Jun-2015, 07:31 AM
When using the UserError procedure, after the caption parenthesis are displayed.

The procedure UserError is internally translated to the Error command. I tried this:



String sMessage sCapt
Move "This is the message" to sMessage
Move "This is the caption" to sCapt

Error DFERR_OPERATOR (sMessage + If(sCapt<>"",C_ErrorCaption + sCapt,""))


In the error message "This is the caption" is displayed as "This is the caption ()".

8953

Vincent Oorsprong
25-Jun-2015, 08:32 AM
Peter,

It looks like a bug I discovere years back with the error command.

As workaround first construct the text and then use this as argument to the ERROR command.

Peter van Mil
25-Jun-2015, 08:54 AM
Vincent,

Good to hear that you have discovered it before. I reported it to get it solved :rolleyes:.

It is possible the use a modified UserError procedure, but I prefer a quick fix by DAW.

Vincent Oorsprong
25-Jun-2015, 09:09 AM
Peter,

I just tested your code and tried to create code that I remembered but I can't get it to fail (both).

Stephen W. Meeley
25-Jun-2015, 09:16 AM
Peter,

This worked fine for me in both 18.1 and 18.0 (just copied and pasted your exact code into a button). Not sure what could be different...

Peter van Mil
25-Jun-2015, 09:33 AM
Stephen,

I found this during development with DF 18.1, but I don't know anymore which version (alpha 3, beta 1?) it was. Anyway, I don't see it anymore. You can close this.