dget/getid

This forum is for eXpress++ general support.
Message
Author
reganc
Posts: 259
Joined: Thu Jan 28, 2010 3:08 am
Location: Hersham, Surrey, UK
Contact:

Re: dget/getid

#11 Post by reganc »

You don't need a codeblock at all for either case.

If I take your original code and modify it like so:

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 := 'MY_GET_'+ltrim(str(i))
    M->paTabulkaNew[ nPosFx, 10 ] := 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 ;
                GETOBJECT paTabulkaNew[i,9] ; 
                GETID cGetId ;
                LOSTFOCUS { || DC_GETREFRESH( GetList, nil, DCGETREFRESH_ID_EXCLUDE, { 'GET_EXPO_CISLO', 'GET_CAS', 'BROWSER' } )
, DC_DebugBrowse( { M->paTabulkaNew }, {"M->paTabulkaNew"}, , , ,  , ,  ) } PARENT oSt_Vst
Next
does this not work for you?

You will have to make sure that the paTabulkaNew array subarrays have 10 elements (the 9th and 10th will be NIL initially). The 9th and 10th will be filled out during the loop iterations.

If you inspect the array after the dialog is created, the 9th element of each get item should be a get object that you can use directly with SetAppFocus() like:

SetAppFocus( M->paTabulkaNew[ nPosFx, 9 ] )

and the 10th element should be the cGetID value for each get field that you could use in the handler :

SetAppFocus( DC_GETOBJECT( GetList, M->paTabulkaNew[ nPosFx, 10 ] ) )
Regan Cawkwell
Real Business Applications Ltd
http://www.rbauk.com

User avatar
rdonnay
Site Admin
Posts: 4745
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: dget/getid

#12 Post by rdonnay »

If you can write a small sample program that I can work with, then maybe I can help you.
The eXpress train is coming - and it has more cars.

Zdeno Bielik
Posts: 147
Joined: Thu Jan 28, 2010 9:24 am
Location: Nitra, Slovakia
Contact:

Re: dget/getid

#13 Post by Zdeno Bielik »

Regan,

ok, I added only one new empty item in every array-item and then fill it in loop with cGetID and it works now!
And GETOBJECT clause is not needed, it works without it.

cGetId := ( 'MY_GET_' + LTrim( Str( ix ) ) )
M->paTabulkaNew[ ix, 11 ] := cGetId
wtf M->paTabulkaNew[ ix, 11 ]

cValid := '{ || MG_V8( ' + AllTrim( Str( ix ) ) + '), MG_TestKV( M->paTabulkaNew, M->pnVolneSkup, GetList ) }'
bValid := &( cValid )

@ nRow, 1 DCSAY AllTrim(M->paTabulkaNew[ix,1])+' - '+AllTrim(M->paTabulkaNew[ix,2]) SAYSIZE 14 SAYRIGHT PARENT oSt_Vst
@ nRow,18 DCGET M->paTabulkaNew[ix,6] PICTURE '99' RANGE 0,99 ;
VALID bValid ;
GETID cGetID ;
LOSTFOCUS { || DC_GETREFRESH( GetList, nil, DCGETREFRESH_ID_EXCLUDE, { 'GET_EXPO_CISLO', 'GET_CAS', 'BROWSER' } ) } PARENT oSt_Vst


Super, thank you !!!

Post Reply