Ticket #123 ( Pending IE )

Short Description FieldIsEntry problem
Entered By: PeteL When: 1998-08-26 07:40:19 Build: 1.03.20d
Categories Type: Problem   Department: Product   Category: SurferScript Functions
I am getting occasional error messages generated by FieldIsEntry, stating the following:

The calculated offset of 0 exceeds the screensize of 1920

It seems that this is an error, since offset 0 is a valid location on the screen.

Append By: WindSurfer  When: 1998-08-26 22:21:33  New Status: Pending Customer
Comment This is actually a bug in the error message, which is adding 1 to the calculated offset--probably to make it so that "1920" wouldn't confuse, since in base 0, 1920 is over the top.

So, the calcuated offset when this message is displayed is actually -1!

Append By: PeteL  When: 1998-08-27 06:44:52  New Status: Pending IE
<TESET offset = 80>
<TELOOP Count First=1 Last=1000 Step=1>
<TESET offset = FindNextBold(offset+1)>
<TEIF offset = -1 OR offset = 1920 OR offset = 80>
<TEIF FieldIsEntry(offset)>
	<TESET Screen.CursorOffset = offset>

Maybe you can tell me how this got a -1 in it then? This is the code that produced the error message. Unless the TEIF check for -1 is failing, the FieldIsEntry should never be executed for a -1 value.

Append By: PeteL  When: 1998-08-27 06:46:44  New Status: Pending IE
Comment oops - messed up the left angle-brackets - did i forget a ";" or something?
Append By: WindSurfer  When: 1998-08-27 09:36:23  New Status: Accepted
Comment Don't worry about it-- fixed it. Also, for future reference, it's easier to just bracket your sample with PRE and /PRE tags rather than having to add the BR tag to end each line.

Hmmm-- perhaps the FIELDIS functions are subtracting one from the single parameter versions rather than treating them as base 0. This is probably the case and explains the problem and identifies another bug to be fixed!

Append By: WindSurfer  When: 1998-09-01 14:00:27  New Status: Pending Customer
Comment Don't know if this may be related to a TEIF bug that was fixed (did just fix one that was exposed by the < tag)-- there is a possibility, but I couldn't get this specific TEIF to fail with latest build (today's).

Let's see if it persists once the new build is deployed. Will let you know when build is ready.

Append By: PeteL  When: 1998-09-04 13:16:08  New Status: Pending IE
Comment now it says that the calculated offset of -1 exceeds screen size of 1920 - does that mean that -1 is being passed, or 0? If it's -1, then the TEIF is still failing.