I have a problem trying to load text files into a TextBox Object.
Here is the scenario:
Page1
Button1 - OnClick: %Name% = "A" ; Page.Jump(Page2)
Button2 - OnClick: %Name% = "B" ; Page.Jump(Page2)
Page2
TextBox Object - load at runtime filename=%SrcDir%\%Name%.txt
If I enter Page1 and press Button2 then it jumps to Page2 and B.txt is shown in the text box - OK
then I go back to Page1 and press Button1 - it jumps to Page2 but B.txt continues to be shown in the text box! - not OK :-((
I can do it the other way round, Button1 then Button2, and the result is the same - the FIRST loaded file "sticks" to the TextBox Object.
No matter how many buttons I have, or how many times I try to load a text file into the TextBox Object, the FIRST load always "stays in the box"!
As I started to doubt my own sanity I put in Dialog Message Boxes to check the variable name before the page jump, at on init, and at on show, but all appears to be perfect - except for the contents of the TextBox!
I can circumvent the problem with wheelbarrows full of hard-coded filenames in kilos of text boxes, If's and Show/Hides but it's cumbersome to say the least.
Bug or restriction? Any ideas?
Here is the scenario:
Page1
Button1 - OnClick: %Name% = "A" ; Page.Jump(Page2)
Button2 - OnClick: %Name% = "B" ; Page.Jump(Page2)
Page2
TextBox Object - load at runtime filename=%SrcDir%\%Name%.txt
If I enter Page1 and press Button2 then it jumps to Page2 and B.txt is shown in the text box - OK
then I go back to Page1 and press Button1 - it jumps to Page2 but B.txt continues to be shown in the text box! - not OK :-((
I can do it the other way round, Button1 then Button2, and the result is the same - the FIRST loaded file "sticks" to the TextBox Object.
No matter how many buttons I have, or how many times I try to load a text file into the TextBox Object, the FIRST load always "stays in the box"!
As I started to doubt my own sanity I put in Dialog Message Boxes to check the variable name before the page jump, at on init, and at on show, but all appears to be perfect - except for the contents of the TextBox!
I can circumvent the problem with wheelbarrows full of hard-coded filenames in kilos of text boxes, If's and Show/Hides but it's cumbersome to say the least.
Bug or restriction? Any ideas?
Comment