2 Replies Latest reply on May 27, 2007 7:31 AM by HyderAlamgir

    TextInput Value not refreshing

    HyderAlamgir Level 1
      Alert.show (fname_input.text+" "+fname); // WILL SHOW HYDER HYDER

      but the the input box on the screen will not update to the new value, it will still show the old value

      Anyone know why this is happening?
        • 1. Re: TextInput Value not refreshing
          BLXWebMaster Level 1
          Can you clarify exactly what you are trying to accomplish. Are you expecting that using the Alert function fname_input.text+" "+fname should update fname_input.text?

          • 2. Re: TextInput Value not refreshing
            HyderAlamgir Level 1
            Sorry, now that I think of it, it really wasn't clear enough!

            What was happening was that I could retrieve the .text property of the TextInput and I could display it is an alertbox or assign it to any other variable but the value wasn't showing up on the TextInput component itself

            For example,

            TextInput -> .text -> "ABC"
            Assigning new value to TextInput -> .text -> "DEF"

            Now, for some reason, the value did not show up on TextInput, the TextInput still said "ABC"

            But if I say Alert.show (TextInput.text) or Trace (TextInput.text) -> it returns "DEF";

            But now it works, I declared the TextInput as a static private variable, that fixed it. Believe me, it was just intuition that made me do it. I really don't know what static does.

            private static var _textInput:TextInput = new TextInput;

            Now if someone can tell me how that fixed it, I'd be grateful!