Page 1 of 1

Copy Paste problem in TGet (Fwh 24.02)

Posted: Thu Feb 20, 2025 12:34 pm
by Horizon
Hi,

This is the sample app.

Code: Select all | Expand

#include "FiveWin.ch"

function TestGetPic

   local oDlg, oGet
   local cGet  := "123456789012345"

   DEFINE DIALOG oDlg SIZE 200,200 PIXEL TRUEPIXEL
   @ 30,30 GET oGet VAR cGet ;
      SIZE 150,20 PIXEL OF oDlg
   @ 80,30 BUTTON "OK" SIZE 80,30 PIXEL OF oDlg ACTION (oDlg:End())

   ACTIVATE DIALOG oDlg CENTERED
   
   ? "cGet = ",cGet

return nil
1. Compile and run app.
2. "6789012345" copy this. (select numbers between quotation marks)
3. focus on app that is compiled before.
4. Select all in Get. and paste (selected text "6789012345" in 2. order)
5. The oGet shows only "6789012345" that is should be.
6. press OK button.
7. cGet variables says "678901234512345"

I think It should be "6789012345".

Any idea? (I use fwh 24.02 and harbour 32 bits)

Re: Copy Paste problem in TGet (Fwh 24.02)

Posted: Thu Feb 20, 2025 3:23 pm
by karinha
Try,

Code: Select all | Expand

// C:\FWH\SAMPLES\PASTECOP.PRG

#Include "FiveWin.ch"

FUNCTION TestGetPic()

   LOCAL oDlg, oGet
   LOCAL cGet  := "123456789012345"

   DEFINE DIALOG oDlg SIZE 200, 200 PIXEL TRUEPIXEL

   oDlg:lHelpIcon := .F.
                                      // 16 digits
   @ 30, 30 GET oGet VAR cGet PICTURE "@R 999999999999999" SIZE 150, 20 ;
      RIGHT PIXEL OF oDlg

   @ 80, 60 BUTTON "OK" SIZE 80, 30 PIXEL OF oDlg ACTION ( oDlg:End() ) CANCEL

   ACTIVATE DIALOG oDlg CENTERED

   ? "cGet = ", VAL( cGet )

RETURN NIL

// FIN / END
Regards, saludos.

Re: Copy Paste problem in TGet (Fwh 24.02)

Posted: Fri Feb 21, 2025 12:20 pm
by Euclides
Hi, this problem exists a long time ago... :(
When I have to paste something in the GET I do the following:

Code: Select all | Expand

   DEFINE CLIPBOARD oClp OF oDlg FORMAT TEXT
  ...
   @ 30, 20 GET oGet VAR cGet BITMAP "..\bitmaps\paste20.bmp" SIZE 120, 22 PIXEL OF oDlg ;
            ACTION (cGet := oClp:GetText(), oGet:Refresh()) 
   ...
   oClp:Close()
Regards, Saludos Euclides

Re: Copy Paste problem in TGet (Fwh 24.02)

Posted: Fri Feb 21, 2025 12:38 pm
by Antonio Linares
Horizon wrote: Thu Feb 20, 2025 12:34 pm Hi,

This is the sample app.

Code: Select all | Expand

#include "FiveWin.ch"

function TestGetPic

   local oDlg, oGet
   local cGet  := "123456789012345"

   DEFINE DIALOG oDlg SIZE 200,200 PIXEL TRUEPIXEL
   @ 30,30 GET oGet VAR cGet ;
      SIZE 150,20 PIXEL OF oDlg
   @ 80,30 BUTTON "OK" SIZE 80,30 PIXEL OF oDlg ACTION (oDlg:End())

   ACTIVATE DIALOG oDlg CENTERED
   
   ? "cGet = ",cGet

return nil
1. Compile and run app.
2. "6789012345" copy this. (select numbers between quotation marks)
3. focus on app that is compiled before.
4. Select all in Get. and paste (selected text "6789012345" in 2. order)
5. The oGet shows only "6789012345" that is should be.
6. press OK button.
7. cGet variables says "678901234512345"

I think It should be "6789012345".

Any idea? (I use fwh 24.02 and harbour 32 bits)
Here it is working fine with FWH 25.01

Please download the EXE from here and test it:
https://github.com/FiveTechSoft/FWH_too ... orizon.exe

Re: Copy Paste problem in TGet (Fwh 24.02)

Posted: Fri Feb 21, 2025 3:50 pm
by Horizon
Antonio Linares wrote: Fri Feb 21, 2025 12:38 pm
Horizon wrote: Thu Feb 20, 2025 12:34 pm Hi,

This is the sample app.

Code: Select all | Expand

#include "FiveWin.ch"

function TestGetPic

   local oDlg, oGet
   local cGet  := "123456789012345"

   DEFINE DIALOG oDlg SIZE 200,200 PIXEL TRUEPIXEL
   @ 30,30 GET oGet VAR cGet ;
      SIZE 150,20 PIXEL OF oDlg
   @ 80,30 BUTTON "OK" SIZE 80,30 PIXEL OF oDlg ACTION (oDlg:End())

   ACTIVATE DIALOG oDlg CENTERED
   
   ? "cGet = ",cGet

return nil
1. Compile and run app.
2. "6789012345" copy this. (select numbers between quotation marks)
3. focus on app that is compiled before.
4. Select all in Get. and paste (selected text "6789012345" in 2. order)
5. The oGet shows only "6789012345" that is should be.
6. press OK button.
7. cGet variables says "678901234512345"

I think It should be "6789012345".

Any idea? (I use fwh 24.02 and harbour 32 bits)
Here it is working fine with FWH 25.01

Please download the EXE from here and test it:
https://github.com/FiveTechSoft/FWH_too ... orizon.exe
Thank you Antonio.

I have downloaded and tried. It is working fine.

I use fwh 24.02. What should I do? (As you know, I could not use fwh 24.09)

Re: Copy Paste problem in TGet (Fwh 24.02)

Posted: Fri Feb 21, 2025 4:22 pm
by karinha
Hakan, what version of xHarbour and BCC are you using with this FWH2402 version?

Tks.

Regards. saludos.

Re: Copy Paste problem in TGet (Fwh 24.02)

Posted: Fri Feb 21, 2025 4:29 pm
by Antonio Linares
Horizon wrote: Fri Feb 21, 2025 3:50 pm
Antonio Linares wrote: Fri Feb 21, 2025 12:38 pm
Horizon wrote: Thu Feb 20, 2025 12:34 pm Hi,

This is the sample app.

Code: Select all | Expand

#include "FiveWin.ch"

function TestGetPic

   local oDlg, oGet
   local cGet  := "123456789012345"

   DEFINE DIALOG oDlg SIZE 200,200 PIXEL TRUEPIXEL
   @ 30,30 GET oGet VAR cGet ;
      SIZE 150,20 PIXEL OF oDlg
   @ 80,30 BUTTON "OK" SIZE 80,30 PIXEL OF oDlg ACTION (oDlg:End())

   ACTIVATE DIALOG oDlg CENTERED
   
   ? "cGet = ",cGet

return nil
1. Compile and run app.
2. "6789012345" copy this. (select numbers between quotation marks)
3. focus on app that is compiled before.
4. Select all in Get. and paste (selected text "6789012345" in 2. order)
5. The oGet shows only "6789012345" that is should be.
6. press OK button.
7. cGet variables says "678901234512345"

I think It should be "6789012345".

Any idea? (I use fwh 24.02 and harbour 32 bits)
Here it is working fine with FWH 25.01

Please download the EXE from here and test it:
https://github.com/FiveTechSoft/FWH_too ... orizon.exe
Thank you Antonio.

I have downloaded and tried. It is working fine.

I use fwh 24.02. What should I do? (As you know, I could not use fwh 24.09)
Upgrade to FWH 25.01