Arrays no longer global
Posted: Fri Feb 11, 2011 2:28 pm
In Designer 2, if I set up an array in the Page Code eg.
If I then tried to access this variable inside the On Mouse Key Click of an object, i.e. a box on screen. it would work perfectly eg.
When the program is run, it outputs "1", and then "hello" and "2" when I click on the button.
In Designer 3, exactly the same program fails as the On Mouse Key Click code no longer knows about the dimmed variable, but it knows the string called fred
When run, it outsputs the "1" as the page loads, then clicking the button prints "hello", the contents of string "fred", then fails with:
Table apple{} not found!
file:test.hws(current line: 53 - in function: func)
In lots of my programs I initialise the vars in the page load that will be needed thoughout the program, now all those programs fail when run under Designer 3
Code: Select all
dim apple[10]
apple[1]=1
apple[2]=2
fred="Hello"
debugprint(apple[1])
Code: Select all
debugprint(fred)
debugprint(apple[1])
In Designer 3, exactly the same program fails as the On Mouse Key Click code no longer knows about the dimmed variable, but it knows the string called fred
When run, it outsputs the "1" as the page loads, then clicking the button prints "hello", the contents of string "fred", then fails with:
Table apple{} not found!
file:test.hws(current line: 53 - in function: func)
In lots of my programs I initialise the vars in the page load that will be needed thoughout the program, now all those programs fail when run under Designer 3