I have a xBrowse to edit an array, its definition is as follows:
- Code: Select all Expand view
REDEFINE XBROWSE oBrw ID 1001 OF oDlg ARRAY aNuevos CELL FASTEDIT;
HEADER {"ORIGEN","DESTINO"} COLUMNS {1,2} PICTURE "@!","@!" SIZES 205,205
oBrw:aCols[ 1 ]:lAutoSave := .F.
oBrw:aCols[ 2 ]:lAutoSave := .T.
oBrw:aCols[ 2 ]:nEditType := EDIT_GET
oBrw:aCols[ 2 ]:bEditValid := {|oGet| check_stock( oGet:cText) }
the validation function is:
- Code: Select all Expand view
- //------------------------------------------------------------------------------
FUNCTION check_Stock( codigo )
//-------------------------- ----------------------------------------------------
LOCAL ret := .F.
nn++
? Codigo, nn
xBrowse( aStock )
RETURN .T.
It is very strange, if you can see I'm printing nn (a global variable for test) after increasing it, the issue is that the xBrowse (Astock) is not displayed until [b]? Code, nn [/ b] is printed twice, with value 1, 2 respectively for [b] nn [/ b], only thereafter xBrowse appears also twice. No matter if function return T. o. F. , the behavior is the same.
some help?
regards
Marcelo