On Dec 12, 2019, at 1:25 PM, John J Foster <[email protected]> wrote:

> This is just weird!
> 
> If I trace it and look to see the value of the OK button it’s alway zero.
> 
> If I place this code:
> 
> PRINT SETTINGS
> If (OK=1)
>       ALERT("Print OK=1")
> Else 
>       ALERT("Cancel OK=0")
> End if 
> 
> It correctly displays ALERT("Print OK=1”) although in TRACE OK=0.
> 
> So in this app the act of tracing is causing it to fail.
> 
> So I have been testing the reports and so far they seem to work. The code is 
> acting like OK was properly set EXCEPT when traced.
> 
> In the new test database the OK button shows 1 in trace and in code. So 
> something about this application I guess.
> 
> Not sure this will help anyone in the future. But it’s here if anyone 
> experiences this unexpected TRACE behavior.

Remember the problems Chip was having with his component that was causing an 
error to appear when he started the database?  There were probably 50 message 
posts from many people on trying to figure out what is going on.

He could put the component in a new, fresh database and it worked without the 
error, but in this one particular host database it would alway throw this error 
on startup. Before even any code was run in On Startup if I remember correctly.

He finally found the problem and it was related to a “Catch” or a “Break” — 
those things you can see in the Runtime Explorer — that was set somewhere that 
was making it happen. Those setting are stored inside the .4DB, not externally. 

Also, I am assuming the “Expression” area in your debugger is empty and 
contains nothing. But what if you had a method in the “Expression” area of the 
debugger and it was running commands that were setting the OK variable? 

Since a fresh new .4DB file does not exhibit your problem, my guess is some 
setting that is in the .4DB that is connected to the debugger that is causing 
this. 

Maybe you should investigate in these areas. 

Tim

*****************************************
Tim Nevels
Innovative Solutions
785-749-3444
[email protected]
*****************************************

**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[email protected]
**********************************************************************

Reply via email to