Page 1 of 1
Bug PICTURE "@R " - URGENTE - Antonio Linares
Posted: Thu Mar 22, 2007 4:13 am
by ericmagaldi
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
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...
Posted: Mon Mar 26, 2007 7:17 am
by Antonio Linares
Éric,
This sample seems to work fine:
Code: Select all
#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 ?
Posted: Tue Mar 27, 2007 8:42 am
by ericmagaldi
É como descrevi:
Selecionar o primeiro dígito (SHIFT+Seta Direita), inserir outro.
Code: Select all
de: (antes deve selecionar o primeiro digito)
// @R 99.999-999
12.345-678
ficará: (digitado o numeor 4)
4..45--78
Posted: Fri Mar 30, 2007 12:44 pm
by Maurilio Viana
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
Posted: Fri Mar 30, 2007 1:38 pm
by Antonio Linares
Maurilio,
Thanks. Yes, we have confirmed the bug.
Its on our todo list to fix it asap.
Posted: Mon Dec 10, 2007 3:44 am
by ericmagaldi
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
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
Posted: Mon Dec 10, 2007 9:25 am
by Antonio Linares
Eric,
This seems to be a good fix for it:
Code: Select all
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()
...