WKIX 4.23 & KixForms.dll 14-08-2004
I have spent some time trying to get to the bottom of why I get spurious errors in my current project, it turns out the values assigned and the executed results are not as expected. The following code written for this post shows that what you would expect to appear in #1 ends up in #2 and so on, very strange. I can not rely on passing into a form variable or successfully extract and test from a form variable. On trying to pass back to $txt I have tried all these combinations and none seem to pass back the value of $VARIABLE1.Text
Anyone any idea what is going on...
Code:
;Test Sample partial code for KixForm - trouble passing data to/from variables - Out of sync !
setoption("NoVarInString","Off")
setoption("WrapAtEOL","on")
debug on
? "Test"
$TBN = "$VARIABLE1"
$TX1 = "1st-Text"
; Partial Form Code
$_ = execute("$$#$TBN = $$PForm.TextBox()")
$_ = execute("$$#$TBN.MaxLength = 10")
$_ = execute("$$#$TBN.Text = $$TX1")
? "#1=" $VARIABLE1.Text
$_ = execute("$$#$TBN.Text = '2nd-Text'")
? "#2=" $VARIABLE1.Text
;other code
$VARIABLE1.Text = "3rd-text"
$_ = execute("$$txt = $$TBN.TEXT")
;$_ = execute("$$txt = $$#$TBN.TEXT")
;$_ = execute("$$#$txt = $$TBN.TEXT")
;$_ = execute("$$#$txt = $$#$TBN.TEXT")
? "#3=" $txt
? "#4=" $VARIABLE1.TEXT
$A = len($txt)
? $A
debug off
sleep 5