Page 1 of 1

.NOT. <B> in _EDITPROTECTED() / Error

Posted: Wed Sep 16, 2015 8:21 am
by Tom
Hi, Roger.

Build 260.

We frequently get error messages from our customers, caused in line 5292 of _DCGETBX.PRG, which is:

Code: Select all

lEditProtect := !Eval(bBlock,oXbp)
The error is not traced by our system, since the app totally f*cks up. Anyway, there is something like ".NOT. <B>" in the low level logs. Looks like Eval(bBlock) returns a codeblock instead of a boolean, but there is no WHEN/EDITPROTECT clause in the dialog doing this.

Re: .NOT. <B> in _EDITPROTECTED() / Error

Posted: Wed Sep 16, 2015 10:45 am
by rdonnay
If you need to know what code block is being called, change _dcgetbx.prg to put a WTF bBlock before the eval. This will help figure it out.

Also, I will change that code to test to make sure that the Eval(bBlock) always returns a logical, otherwise I will ignore it.

You can do the following for now:

was:

Code: Select all

lEditProtect := !Eval(bBlock,oXbp)
is:

Code: Select all

xValue := Eval(bBlock,oXbp)
IF Valtype(xValue) == 'L'
  lEditProtect := xValue
ENDIF

Re: .NOT. <B> in _EDITPROTECTED() / Error

Posted: Thu Sep 17, 2015 12:18 am
by Tom
Thanks. But lEditProtect should set to !Eval(), so this seems to be more correct:

Code: Select all

xValue := Eval(bBlock,oXbp)
IF Valtype(xValue) == 'L'
  lEditProtect := !xValue
ENDIF

Re: .NOT. <B> in _EDITPROTECTED() / Error

Posted: Thu Sep 17, 2015 8:13 am
by rdonnay
Yes. You are correct.