FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Bug PICTURE "@R " - URGENTE - Antonio Linares
Posts: 37
Joined: Tue Feb 20, 2007 09:26 AM
Bug PICTURE "@R " - URGENTE - Antonio Linares
Posted: Thu Mar 22, 2007 04:13 AM
Olá Antonio..

Percebi que ao selecionar o primeiro dígito (SHIFT + SETA) e inserir outro, bagunça a máscara na tela, e fazendo parte no valor da variável.

  Exemplo:
   cSeek:=SPACE(08)
   @  7, 8 GET cCep PICTURE '@R 99.999-999"


Isso ocorre tanto @ get / ReDefine...

Mas uma que esse FiveWin me apronta...
virtually,
Éric
xHarbour.org + Borland C + FiveWin (2.8/6.12) + Pelles C + HBMake + ADSCDX
São Paulo - Brasil
http://xBaseSuporte.freeforums.org
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Bug PICTURE "@R " - URGENTE - Antonio Linares
Posted: Mon Mar 26, 2007 07:17 AM
Éric,

This sample seems to work fine:
#include "FiveWin.ch"

function Main()

   local oDlg, cCep := SPACE( 8 )
    
   DEFINE DIALOG oDlg  
    
   @  2, 2 GET cCep PICTURE "@R 99.999-999"
   
   ACTIVATE DIALOG oDlg CENTERED

return nil

How to reproduce the error ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 37
Joined: Tue Feb 20, 2007 09:26 AM
Bug PICTURE "@R " - URGENTE - Antonio Linares
Posted: Tue Mar 27, 2007 08:42 AM
How to reproduce the error ?

É como descrevi:
Selecionar o primeiro dígito (SHIFT+Seta Direita), inserir outro.

de: (antes deve selecionar o primeiro digito)
// @R 99.999-999
12.345-678 
ficará: (digitado o numeor 4)
4..45--78
virtually,
Éric
xHarbour.org + Borland C + FiveWin (2.8/6.12) + Pelles C + HBMake + ADSCDX
São Paulo - Brasil
http://xBaseSuporte.freeforums.org
Posts: 252
Joined: Tue Oct 25, 2005 02:48 PM
Bug PICTURE "@R " - URGENTE - Antonio Linares
Posted: Fri Mar 30, 2007 12:44 PM

Antonio,

I don't tested it but what Eric says is:

When you use @R picture and select the text using shift key + right arrow characters from picture mask "mix" with the get value.
If you use "@R 99.999-999" picture and fill the get with "12345678" it will be (correctly) displayed to "12.345-679", but if you select the text with shift + right arrow the get value turn into the "4..45--78" ("." and "-" mix with get value).
I don't tryed it. I'm only translating what Eric wanted to say ;)

Regards!
Maurilio

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Bug PICTURE "@R " - URGENTE - Antonio Linares
Posted: Fri Mar 30, 2007 01:38 PM

Maurilio,

Thanks. Yes, we have confirmed the bug.

Its on our todo list to fix it asap.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 37
Joined: Tue Feb 20, 2007 09:26 AM
Bug PICTURE "@R " - URGENTE - Antonio Linares
Posted: Mon Dec 10, 2007 03:44 AM
Antonio Linares wrote:Thanks. Yes, we have confirmed the bug.

Its on our todo list to fix it asap.


Please Antonio,
what code used for fix.

I temporarily (quebra-galho), deny few keys:
METHOD KeyDown( nKey, nFlags ) CLASS MGet

if ::oGet:Type='C' .and. ! EMPTY(::oGet:PICTURE) .and. ;
    (nKey == VK_LEFT .OR. nKey == VK_RIGHT .or. ;
    nKey == VK_END .or. nKey == VK_HOME) .and. ;
    GetKeyState( VK_SHIFT )

else
   Super:KeyDown( nKey, nFlags )

endif

return self
virtually,
Éric
xHarbour.org + Borland C + FiveWin (2.8/6.12) + Pelles C + HBMake + ADSCDX
São Paulo - Brasil
http://xBaseSuporte.freeforums.org
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Bug PICTURE "@R " - URGENTE - Antonio Linares
Posted: Mon Dec 10, 2007 09:25 AM
Eric,

This seems to be a good fix for it:
METHOD GetDelSel( nStart, nEnd ) CLASS TGet

   ::oGet:buffer = Left( ::oGet:buffer, Min( nEnd, nStart ) ) ;
                   + Right( ::oGet:buffer, ;
                            Len( ::oGet:buffer ) - Max( nEnd, nStart ) ) ;
                   + Space( Abs( nStart - nEnd ) )

   if ! Empty( ::oGet:Picture )         // New !
      ::SendMsg( WM_KILLFOCUS )  // New !
      ::SendMsg( WM_SETFOCUS )   // New !
   endif                                         // New ! 

   ::oGet:Assign()
   ...
regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion