FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Bug in TGet
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM

Bug in TGet

Posted: Sun Oct 11, 2009 11:37 AM
In the following sample, try to paste the string "123456789012345678901234567890" in the GET and you will see that the picture is not respected:

Code (fw): Select all Collapse
#include "Fivewin.ch"


FUNCTION MAIN()

    LOCAL oDlg, oGet

    LOCAL cVar := SPACE( 39 )

    DEFINE DIALOG oDlg

    @ 1, 1 GET oGet VAR cVar;
           PICTURE "999-999-999-999-999-999-999-999-999-999"

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

    ACTIVATE DIALOG oDlg;
             CENTER

    RETURN NIL


EMG
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM

Re: Bug in TGet

Posted: Tue Oct 13, 2009 04:52 PM

Mr EMG
May I ask, if this works correctly in native (x)Harbour without FWH ? Is this problem only with FWH ?

Regards



G. N. Rao.

Hyderabad, India
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM

Re: Bug in TGet

Posted: Tue Oct 13, 2009 07:26 PM

Yes, it works correctly in pure xHarbour console mode. As in subject, the bug is in FWH TGet class.

EMG

Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM

Re: Bug in TGet

Posted: Thu Dec 03, 2009 01:54 PM
Enrico,

Testing Your example, I noticed, a RETURN or moving to the next Get,
refreshes the Format.



Best Regards
Uwe :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM

Re: Bug in TGet

Posted: Thu Dec 03, 2009 03:06 PM

Yes, but as you can see one digit out of four is missing.

EMG

Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM

Re: Bug in TGet

Posted: Thu Dec 03, 2009 11:48 PM

Enrico,

I use FWH 9.11 and the latest version (11/2009) of xHarbour Builder.

I did some tests and I found no problem at all : not with 1 get and not with 2 gets.

I don't know what's happening.

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM

Re: Bug in TGet

Posted: Thu Dec 03, 2009 11:53 PM

Are you sure? Please, can you send me your EXE to test it here?

EMG

Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM

Re: Bug in TGet

Posted: Fri Dec 04, 2009 11:00 AM
Enrico,

You can download an EXE-file at http://www.ma-consult.be/test.exe.

Please let me know when you have used the test so I can deleted it from my webspace.

Good luck.

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM

Re: Bug in TGet

Posted: Fri Dec 04, 2009 11:13 AM

I just downloaded it and tested, thank you. It shows the problem. If you paste this string:

123456789012345678901234567890

you will get

123-567-901-345-789-123-567-90 - - - -

As you can see, 4 is missing, 8 is missing, and so on. If you try to insert that string manually the result is correct:

123-456-789-012-345-678-901-234-567-890

EMG

Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM

Re: Bug in TGet

Posted: Fri Dec 04, 2009 12:10 PM

Enrico,

Indeed, the problems occurs when pasting.

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM

Re: Bug in TGet

Posted: Fri Dec 04, 2009 12:12 PM

Yes, as I wrote in the first message of this thread. :-)

EMG

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: Bug in TGet

Posted: Fri Dec 04, 2009 12:39 PM
Enrico,

I think it is not a FWH bug, I explain you why :-)

In Clipper or in Harbour we can not "paste" a value into a GET, we just can type it and FWH does it fine this way too. When we paste a value into a FWH GET we are simply replacing the contained oGet buffer and not typing each one of the characters. Please run this test to see what I mean:
Code (fw): Select all Collapse
#include "Fivewin.ch"

FUNCTION MAIN()

    LOCAL oDlg, oGet

    LOCAL cVar := SPACE( 39 )

    DEFINE DIALOG oDlg

    @ 1, 1 GET oGet VAR cVar;
           PICTURE "999-999-999-999-999-999-999-999-999-999"
        
    // standard Harbour code
    oGet:oGet:SetFocus()     
    oGet:oGet:buffer = "1234567890"
    oGet:oGet:Assign()  
    oGet:oGet:UpdateBuffer()
    // end of standard Harbour code     
    MsgInfo( oGet:oGet:buffer )       

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

    ACTIVATE DIALOG oDlg;
             CENTER

    RETURN NIL
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: Bug in TGet

Posted: Fri Dec 04, 2009 12:46 PM
Enrico,

This small example shows more clearly what I mean:
Code (fw): Select all Collapse
    MsgInfo( Transform( "1234567890", "999-999-999-999-999-999-999-999-999-999" ) )

Its a (wrong?) Transform() behavior:
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: Bug in TGet

Posted: Fri Dec 04, 2009 01:08 PM
Enrico,

I am reviewing Transform() docs and it does not manage "-" in any way. It has no special meaning for Transform():

http://www.ousob.com/ng/53guide/nga46c2.php

GET's PICTURE docs:
http://www.ousob.com/ng/53guide/ngaee8c.php

I think we are missing something...
regards, saludos

Antonio Linares
www.fivetechsoft.com