I would like to put a individual pupup on gets that I create in a loop. But it does not work, get always the value of the last x from the loop in makegblock. What is wrong in the action block of DCSUBMENU ?
regards
Rudolf
Code: Select all
aGets := {}
for x := 1 to 5
aadd(aGets,NIL)
cMenu := "oMenu" + ntrim(x)
cVar := "oGet" + ntrim(x)
@ nTop,nLeft dcmultiline &cVar size nWidth,nHeight object aGets[x] EVAL { |o| o:RbDown := { |x,y,z| &cMenu:PopUp ( z, x, 2 , ( 2 + 4 + 64 + 128 + 512 ) + 16 ) } }
DCSUBMENU &cMenu PROMPT "Zusätze" PARENT aGets[x]
DCSUBMENU oMenu1 prompt "ins Wörterbuch" action &("{||makegblock(" + ntrim(x) + ")}") PARENT &cMenu
...
next x
function makegblock(x)
dcqdebug x // always 5
return .t.