In trying to track down an intermittent bug, I've narrowed it down to the following tiny point.
The code is from a small preferences dialog. The failing part has to do with a simple TEXT box which the user can leave blank or enter a single character into.
Retrieving was not always successful as sometimes, when a character was entered, it did not appear to be detected. So I added some MSGBOX's and ran through it over and over.
1. ERR is always zero, as expected.
2. The 1st display of LeftClickChar is ALWAYS correct (what was entered).
3. The 2nd display of LeftClickChar is blank about 1/2 the time, not always.
4. LeftClickChar is just a simple dynamic STRING.
I can't believe LEFT$ is failing, but it sure looks like that.
EDIT: I switched to MID$(xxx, 1, 1) from LEFT$ but no difference, but what else can alter the string between the MSGBOX's?
Any other thoughts? I'm tearing my hair out.
George
The code is from a small preferences dialog. The failing part has to do with a simple TEXT box which the user can leave blank or enter a single character into.
Retrieving was not always successful as sometimes, when a character was entered, it did not appear to be detected. So I added some MSGBOX's and ran through it over and over.
1. ERR is always zero, as expected.
2. The 1st display of LeftClickChar is ALWAYS correct (what was entered).
3. The 2nd display of LeftClickChar is blank about 1/2 the time, not always.
4. LeftClickChar is just a simple dynamic STRING.
I can't believe LEFT$ is failing, but it sure looks like that.
EDIT: I switched to MID$(xxx, 1, 1) from LEFT$ but no difference, but what else can alter the string between the MSGBOX's?
Any other thoughts? I'm tearing my hair out.
George
Code:
CONTROL GET TEXT hMouse, %MOUSE_LEFTCLICK_CHAR TO LeftClickChar MSGBOX "Err=" & FORMAT$(ERR) MSGBOX LeftClickChar LeftClickChar = LEFT$(LeftClickChar, 1) MSGBOX LeftClickChar
Comment