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

This forum is for eXpress++ general support.
Post Reply
Message
Author
User avatar
Tom
Posts: 1234
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

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

#1 Post 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.
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

User avatar
rdonnay
Site Admin
Posts: 4813
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

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

#2 Post 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
The eXpress train is coming - and it has more cars.

User avatar
Tom
Posts: 1234
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

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

#3 Post 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
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

User avatar
rdonnay
Site Admin
Posts: 4813
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

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

#4 Post by rdonnay »

Yes. You are correct.
The eXpress train is coming - and it has more cars.

Post Reply