Page 1 of 1

TGet bug

Posted: Tue Apr 18, 2006 9:40 pm
by Enrico Maria Giordano
This is the sample. Try to input 1.25 and you'll get 1.30 on lost focus (xHarbour, BCC55):

Code: Select all

#include "Fivewin.ch"


FUNCTION MAIN()

    LOCAL oDlg

    LOCAL nVar := 0

    DEFINE DIALOG oDlg

    @ 1, 1 GET nVar;
           PICTURE "@EZ 99,999.99";
           RIGHT

    @ 3, 1 BUTTON "&Close";
           ACTION oDlg:End()

    ACTIVATE DIALOG oDlg;
             CENTER

    ? nVar

    RETURN NIL
EMG

Posted: Wed Apr 19, 2006 2:02 am
by Manuel Valdenebro
Not error for me.

Posted: Wed Apr 19, 2006 6:30 am
by Enrico Maria Giordano
What FWH build are you using? I'm using April 2006 build.

EMG

Posted: Wed Apr 19, 2006 6:37 am
by Enrico Maria Giordano
And what xHarbour release? I'm using the latest from CVS. I suspect the problem is there...

EMG

Posted: Wed Apr 19, 2006 7:01 am
by Enrico Maria Giordano
Ok, I found the problem in xHarbour and just reported it to the xHarbour developers mailing list.
This is the sample. Try to input 1.25 and then press F2 twice. You will get
1.30 instead of 1.25.

Code: Select all

#include "Inkey.ch"


FUNCTION MAIN()

    LOCAL nVar := 0

    PUBLIC GetList := {}

    SET CONFIRM ON

    SET KEY K_F2 TO CHANGEPICTURE

    CLS

    @ 10, 10 GET nVar;
             PICTURE "@EZ 99,999.99"

    READ

    RETURN NIL


STATIC FUNCTION CHANGEPICTURE()

    IF M -> GetList[ 1 ]:Picture = "@EZ 99,999.99"
        M -> GetList[ 1 ]:Picture = "@EZ 99999.99"
    ELSE
        M -> GetList[ 1 ]:Picture = "@EZ 99,999.99"
    ENDIF

    RETURN NIL
EMG