Weird and Horrible Problem??!!
David Burgun
dburgun at dsl.pipex.com
Thu Apr 13 11:53:56 EDT 2006
Hi All,
I have some code that does this:
put "KindStart" into myKind
Then, later on it does this:
switch myKind
case "KindStart"
..................
break
end switch
The problem is that it never hits the case "KindStart" statement. I
put a breakpoint in the Script that does the switch and the variable
is set to "KindStart", but it doesn't hit the case statement.
Perplexed and after a lot of mucking around, I did this:
put "DATA1" into gArray[myKind]
When I set the variable.
and
put gArray[theKind] into myData
When I switch. However, the above sets myData to empty (although
looking at the array in the debugger, there *IS* an entry for
"KindStart" and it's "DATA1" as expected
I then do:
put "DATA2" into gArray[myKind]
And when I look at the Array, there are now *TWO* entries that read
"KindStart","DATA1" and "KindStart","DATA2"!!!!!!
How can an array have *two* identical entries??? My guess is that
they are not identical and that I just can't see the difference using
the debugger?? Maybe some non-displayable data got in there some how?
The Kind could be stored in a Custom Property is that makes any
difference.
Any Tips on how to track down what is going wrong here would be
greatly appreciated.
Thanks a lot
All the Best
Dave
More information about the use-livecode
mailing list