Bug in TGet

Bug in TGet

Postby Enrico Maria Giordano » 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: Select all  Expand view
#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
User avatar
Enrico Maria Giordano
 
Posts: 8568
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Bug in TGet

Postby nageswaragunupudi » Tue Oct 13, 2009 4: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
User avatar
nageswaragunupudi
 
Posts: 10482
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Bug in TGet

Postby Enrico Maria Giordano » Tue Oct 13, 2009 7:26 pm

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

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8568
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia


Re: Bug in TGet

Postby ukoenig » Thu Dec 03, 2009 1:54 pm

Enrico,

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

Image

Best Regards
Uwe :lol:
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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: Bug in TGet

Postby Enrico Maria Giordano » Thu Dec 03, 2009 3:06 pm

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

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8568
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Bug in TGet

Postby driessen » 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. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: Bug in TGet

Postby Enrico Maria Giordano » Thu Dec 03, 2009 11:53 pm

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

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8568
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Bug in TGet

Postby driessen » 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. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: Bug in TGet

Postby Enrico Maria Giordano » 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
User avatar
Enrico Maria Giordano
 
Posts: 8568
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Bug in TGet

Postby driessen » 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. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: Bug in TGet

Postby Enrico Maria Giordano » Fri Dec 04, 2009 12:12 pm

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

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8568
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Bug in TGet

Postby Antonio Linares » 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: Select all  Expand view
#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
User avatar
Antonio Linares
Site Admin
 
Posts: 41898
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Bug in TGet

Postby Antonio Linares » Fri Dec 04, 2009 12:46 pm

Enrico,

This small example shows more clearly what I mean:
Code: Select all  Expand view

    MsgInfo( Transform( "1234567890", "999-999-999-999-999-999-999-999-999-999" ) )
 

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

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41898
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Bug in TGet

Postby Antonio Linares » Fri Dec 04, 2009 1: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
User avatar
Antonio Linares
Site Admin
 
Posts: 41898
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 32 guests