In xbrowse valid is Executed twice
Posted: Fri Jun 01, 2018 12:02 pm
hi all,
when I exit from the get in XBROWSE with the TAB key
the valid is done 2 times while if I go out with enter is performed only once.
I attach an example to reproduce the problem.
My version of FWH is 17.01.
Is this anomaly already resolved?
Thank you
when I exit from the get in XBROWSE with the TAB key
the valid is done 2 times while if I go out with enter is performed only once.
I attach an example to reproduce the problem.
My version of FWH is 17.01.
Is this anomaly already resolved?
Thank you
Code: Select all
// managing arrays with XBrowse
#INCLUDE "FiveWin.ch"
FUNCTION Main()
LOCAL oDlg
LOCAl oCol
LOCAL oBrw
LOCAL aSample := {}
LOCAL cIniFile := GetWinDir()+"\FiveWin.ini"
SET _3DLOOK ON
aadd(aSample, {"Init 01", "Init 02"})
DEFINE DIALOG oDlg FROM 2, 2 TO 30, 100 ;
TITLE "FiveWin TWBrowse Power!!!"
@ 1, 2 XBROWSE oBrw OF oDlg ;
SIZE 180, 180 ARRAY aSample ;
FASTEDIT
ADD COLUMN oCol TO oBrw ARRAY ELEM 1 SIZE 150 EDITABLE VALID { | oGet | Controlli("01", oGet:VarGet()) }
ADD COLUMN oCol TO oBrw ARRAY ELEM 2 SIZE 150 EDITABLE VALID { | oGet | Controlli("02", oGet:VarGet()) }
oBrw:createfromcode()
@ 1, 55 BUTTON "E&xit" OF oDlg ;
ACTION oDlg:End() CANCEL
@ 3, 55 BUTTON "&Add " OF oDlg ;
ACTION ( AAdd( aSample, { time() + "[01]", dtoc(date()) + "[02]" } ), ;
oBrw:GoBottom(),;
oBrw:SetFocus(),;
oBrw:Refresh() )
@ 5, 55 BUTTON "&Del " OF oDlg ;
ACTION iif( len( aSample ) > 0 , ;
(asize( aSample, len( aSample ) - 1 ), oBrw:Refresh()),)
ACTIVATE DIALOG oDlg ;
CENTERED
RETURN( NIL )
FUNCTION Controlli ( cCol , cVal )
if empty(cVal)
MsgStop("Error")
return(.F.)
ENDIF
return (.T.)