please, can you add support for CodeBlock in GETID clause of DCGET like it exists for COLOR clause?
I need create GETID names at runtime, because unique ID I need in custom handler,
where I want set to corresponding object after pressing(some next actions/calculatings are done too) any possible „defined“ hotkeys.
Code: Select all
For i := 1 To Len( M->paTabulkaNew )
nRow++
cValid := '{ || MG_V8( ' + AllTrim( Str( i ) ) + '), MG_TestKV( M->paTabulkaNew, M->pnVolneSkup, GetList ) }'
bValid := &( cValid )
cGetID := '{ || CreateGetID_Name( ' + AllTrim( Str( i ) ) + ' ) }'
bGetID := &( cGetID )
@ nRow, 1 DCSAY AllTrim(M->paTabulkaNew[i,1])+' - '+AllTrim(M->paTabulkaNew[i,2]) SAYSIZE 14 SAYRIGHT PARENT oSt_Vst
@ nRow,18 DCGET M->paTabulkaNew[i,6] PICTURE '99' RANGE 0,99 ;
VALID bValid ;
GETID bGetID ;
LOSTFOCUS { || DC_GETREFRESH( GetList, nil, DCGETREFRESH_ID_EXCLUDE, { 'GET_EXPO_CISLO', 'GET_CAS', 'BROWSER' } )
, DC_DebugBrowse( { M->paTabulkaNew }, {"M->paTabulkaNew"}, , , , , , ) } PARENT oSt_Vst
Next
Code: Select all
********************************
Function CreateGetID_Name( _i )
********************************
Local cGetName := ''
wtf _i
cGetName := ( 'GET_F' + PadL( AllTrim( Str( _i, 2 ) ), 2, '0' ) )
wtf cGetName
Return ( cGetName )
*
Many thanks.
Zdeno
COLOR | GETCOLOR <ncFGc>, <ncBGc> are foreground and background
colors. They may be character strings representing valid text-based
colors supported by SetColor() or they may be numeric constants
which begin with either the prefix GRA_CLR_ or the prefix
XBPSYSCLR_ as defined in GRA.CH or XBP.CH. If <bncFGc> is a
code block is must return a 2-element array containing a
foreground and background color.
GETID <cId> is a unique identifier for this object. This ID is used
with functions like DC_GETORIGUPDATED() to determine the status
of a get object.