#146247 - 2005-08-23 04:02 PM
execute () variables not passing when expected.
|
MACE
Starting to like KiXtart
Registered: 2004-09-07
Posts: 150
Loc: Manchester UK
|
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
|
|
Top
|
|
|
|
#146248 - 2005-08-23 04:47 PM
Re: execute () variables not passing when expected.
|
Bryce
KiX Supporter
   
Registered: 2000-02-29
Posts: 3167
Loc: Houston TX
|
I would use novarinstrings ON, not OFF.
and this looks like a typo... "$$#$TBN" ???
Code:
;Test Sample partial code for KixForm - trouble passing data to/from variables - Out of sync ! setoption("NoVarInStrings","ON") 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=" $tbn.Text $_ = execute("$TBN.Text = '2nd-Text'") ? "#2=" $TBN.Text
;other code $VARIABLE1.Text = "3rd-text" $_ = execute("$txt = " + $TBN.TEXT)
? "#3=" $txt ? "#4=" $VARIABLE1.TEXT $A = len($txt) ? $A
Edited by Bryce (2005-08-23 04:53 PM)
|
|
Top
|
|
|
|
Moderator: Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 2220 anonymous users online.
|
|
|