Rimantas wrote: Alreday found samples for that - testarr4.prg and tesloop.prg . But I have an problem with bValid for oGets arrays . My function n_pas( cAlias, cFld ) get an lats cFld value . How it make true ? One solution it can be at oDlg close moment , but I want to do that in oGet stage
All is workig OK . Simply create codeblock
local bCdb := { |oGet, nGt, others params...| get_blc( oGet, nGt, other params ..) }
Now in the loop evaluate codeblock
for nGt := 1 to len( aFlds )
oGet[ nGt ] = eval( bCdb, oGet[ nGt ], nGt, other params )
next
mine get_blc function :
static function get_blc( oDlg, oGt, cAlias, cFld, nGt, aGet, cPict, nRow, nCol )
oGt := TGet():New( nRow, nCol, GenLocalBlock( aGet, nGt ), oDlg,,, cPict,,,,,,, .t. )
if fieldtp( cAlias, cFld ) == "C"
oGt:bValid := { |oGet| n_pas( cAlias, cFld,, oGet:Value(), .t. ) }
endif
return( oGt )
static function GenLocalBlock( aGet, n )
return bSETGET( aGet[ n ] )
Now all is working OK ! With best regards !
Rimantas U.