Bug PICTURE "@R " - URGENTE - Antonio Linares

Bug PICTURE "@R " - URGENTE - Antonio Linares

Postby ericmagaldi » Thu Mar 22, 2007 4: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.

Code: Select all  Expand view
  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
User avatar
ericmagaldi
 
Posts: 37
Joined: Tue Feb 20, 2007 9:26 am
Location: São Paulo - Brazil

Postby Antonio Linares » Mon Mar 26, 2007 7:17 am

Éric,

This sample seems to work fine:
Code: Select all  Expand view
#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
User avatar
Antonio Linares
Site Admin
 
Posts: 42079
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby ericmagaldi » Tue Mar 27, 2007 8:42 am

Code: Select all  Expand view
How to reproduce the error ?

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

Code: Select all  Expand view
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
User avatar
ericmagaldi
 
Posts: 37
Joined: Tue Feb 20, 2007 9:26 am
Location: São Paulo - Brazil

Postby Maurilio Viana » 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
User avatar
Maurilio Viana
 
Posts: 252
Joined: Tue Oct 25, 2005 2:48 pm
Location: Garça/Garza/Heron City - Brazil

Postby Antonio Linares » Fri Mar 30, 2007 1: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42079
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby ericmagaldi » Mon Dec 10, 2007 3: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:
Code: Select all  Expand view
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
User avatar
ericmagaldi
 
Posts: 37
Joined: Tue Feb 20, 2007 9:26 am
Location: São Paulo - Brazil

Postby Antonio Linares » Mon Dec 10, 2007 9:25 am

Eric,

This seems to be a good fix for it:
Code: Select all  Expand view
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
User avatar
Antonio Linares
Site Admin
 
Posts: 42079
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 78 guests