Announcement

Collapse
No announcement yet.

TextBox Filename unchangeable after first use - bug or restriction?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • TextBox Filename unchangeable after first use - bug or restriction?

    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?

  • #2
    Re: TextBox Filename unchangeable after first use - bug or restriction?

    Works just fine over here without any problems at all, here's what I did.

    1. I setup a new file with two pages.
    2. I created 2 text files named a.txt and b.txt then put them in my distribution folder.
    3. I put two buttons on page 1, each contains a set variable action which sets the %myFile% variable to either "a" or "b" respectively, as well as a page jump action to page 2.
    4. On page 2 I have a textbox object which has been set to be empty.
    5. On page 2 Onshow I simply use a TEXTFILE > READ action to read %SrcDir%\%myFile%.txt file into a variable named %myText% and then used a textboxobject settext action to put the contents of %myText% into the text object. Voila!

    Very basic but it works 100%.

    Corey Milner
    Creative Director, Indigo Rose Software

    Comment


    • #3
      Re: TextBox Filename unchangeable after first use - bug or restriction?

      Thank you very much, Corey!

      Very simple when you know how!

      What an idiot I am! The problem is that with age my learning curve is getting a bit like my wife's curves - shaky to say the least ;-)

      So many "Available Actions" ... So little time ...

      Is it a design restriction then that the filename specified when defining the Text box Object can only be assigned a value thru a variable ONCE, and once only? It "sticks" - sort of thing?

      BTW, any progress on letting us have the templates for the Sample Applications? I'm patient but I'm dying of "Great Expectations" ...

      Once again, thank you for the prompt assistance - much appreciated

      --
      Francis
      Rio de Janeiro - Brasil
      "Have wheelbarrows - will sell"

      Comment


      • #4
        Re: TextBox Filename unchangeable after first use - bug or restriction?

        You can freely use the TEXTBOXOBJECT > SETTEXT action at any time to edit the contents of any textbox object, dynamically or static.

        Here's the files:
        http://www.indigorose.com/ubbthreads...amp;Main=15204

        Corey Milner
        Creative Director, Indigo Rose Software

        Comment


        • #5
          Re: TextBox Filename unchangeable after first use - bug or restriction?

          Corey, your solution worked like a dream! Thanks!

          Give that man a prize!

          Better still - I'll send you a wheelbarrow ;-)

          --
          Francis
          Rio de Janeiro - Brasil
          Computer Consultant & Wheelbarrow Wholesale Salesman

          Comment


          • #6
            Re: TextBox Filename unchangeable after first use - bug or restriction?

            Glad you got what you needed...

            Corey Milner
            Creative Director, Indigo Rose Software

            Comment

            Working...
            X
            😀
            🥰
            🤢
            😎
            😡
            👍
            👎