This code works when variable checking is NOT active:
Code: Select all
on mouseUp
set the textStyle of the selectedChunk to link
set the linkText of the selectedChunk to "http://revolution.byu.edu/textfind/TextandFind.php"
end mouseUp
Code: Select all
button "Make Link": compilation error at line 2 (Expression: unquoted literal), char 43
In my view, variable checking should just check to see if a variable has been previously declared PERIOD. But, it seems that LC somehow "hides" the fact that what appear to be reserved words (or constants) in the code are actually handled internally as variables. Hence it triggers errors based upon whether what appears to be a reserved word or constant is really an "imposter" (i.e., a variable disguised as a reserved word or system defined constant). I don't know. I am just speculating. But, all I know is that in VB, "option explicit" let me declare my variables, or warn me when I had not, and that was the end of it. I just don't understand variable checking and would appreciate some enlightenment.
Thanks!