![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
|
SHOWDIALOG "Test" PROC "dialogboxproc.l" TRIGGER "OPEN", "UPDATE" @2,1 HEIGHT 20 WIDTH 57 @5,9 ?? "testvar.a = " + testvar.a ACCEPT @3,9 WIDTH 36 "A25" TAG "tagTestVar" TO testvar.a PUSHBUTTON @15,37 WIDTH 13 "Ok" CANCEL TO btn ENDDIALOG I initialize testvar.a to "", start the SHOWDIALOG and enter "Hello" in the ACCEPT control, then tab out of it, triggering UPDATE. Dialogboxproc.l() calls update.tagtestvar() (thank you, Skip Rowland): PROC update.tagtestvar() PRIVATE proc.a proc.a = "update.tagtestvar" DEBUG ; CONTROLVALUE("tagtestvar") = "Hello" ; testvar.a = "" testvar.a = "I changed it" ; CONTROLVALUE("tagtestvar") = "Hello" ; testvar.a = "I changed it" RESYNCCONTROL "tagtestvar" ; CONTROLVALUE("tagtestvar") = "I changed it" ; testvar.a = "I changed it" RETURN ; dialogboxproc.l RETURNs True to the SHOWDIALOG ENDPROC When control returns to SHOWDIALOG, CONTROLVALUE("tagtestvar") is still "I changed it", but testvar.a = "Hello" !!! I've tried reassigning testvar.a = CONTROLVALUE("tagtestvar") after RESYNCCONTROL, and sprinkling REFRESHDIALOG here and there, but to no |
#2
| |||
| |||
|
|
My simple solution was.. <snip> .. The operator has to press TAB once more to finalize the change and move on. |
#3
| |||
| |||
|
|
Dick Rubin wrote: I didn't make it clear -- the problem is not the display, but the actual value of the variable. no, it's the display.. didn't you try what I suggested? the problem is this.. normally, you'll have a var that gets updated in your waitproc.. when you REFRESH and cycle back to the dialog, you see the new value of the var.. but.. in this case, you're reseting the value of the control, then resetting the var based on that.. it's not the same thing.. when you cycle back to the dialog, the background (including text, vars, etc) gets done first.. then the controls.. but then you're changing the var again *after* the control.. that's why you need the REPAINT.. to redo the background (text, vars, etc.) to reflect changes *after* the CONTROL stuff.. -- Steve Green - Diamond Software Group, Inc - Waldorf Maryland USA Corel CTech Paradox - http://www.diamondsg.com - Support/Downloads/Links --------------------------------------------------------------------------------- Do you need a Sanity Check? http://www.diamondsg.com/sanity.htm Upgrade/Downgrade versions? http://www.diamondsg.com/upgrade.htm ------------------------------------------------------------------------- |
#4
| |||
| |||
|
|
Where would you place the REPAINTDIALOG command in the code Dick Rubin posted? |
![]() |
| Thread Tools | |
| Display Modes | |
| |