5 Replies Latest reply on Jun 3, 2007 7:30 PM by kglad

    Max Text in Textbox

    IreDevil Level 1
      Hi there,

      I am creating a maths quiz for student and one of the questions requires student to write numbers into words.
      I've created a variable to store the answer the student's input. The answer for this particular question is
      'Four million, three hundred and seventy thousand and ten'. At the end of the quiz i will show the student her answer and the correct answer but it seems that the number of text cannot be stored in the variable i have created.

      May i ask how do i make it that such a long text of words can be stored in a variable?
      Also, i need to check the answer for the upper and lower case.

      X_x

        • 1. Re: Max Text in Textbox
          kglad Adobe Community Professional & MVP
          if you really want to check for an exact match, your code is ok. but that's really checking for spelling, spacing and casing in addition to checking for a concept.
          • 2. Re: Max Text in Textbox
            Rothrock Level 5
            Also if the number is supposed to be 4,370,010 I was taught that should be:

            Four million three hundred seventy thousand ten

            Ands were only to be used to denote the decimal point as in (49.5)

            Fortynine and five tenths

            I had a middle-school math teacher who really was quite mean about it. What were you taught kglad?

            As for the number of characters in text, there may be a limit, but you are a long ways from it. Numbers like 65536 jump into my head. (Although I have no specific knowledge that would make me say that.) Another thing that might be happening is that you are getting an invisible return at the end of the input string? So check for that.
            • 3. Re: Max Text in Textbox
              kglad Adobe Community Professional & MVP
              i don't remember anyone teaching anything about the grammar of numbers. but i would think this would be something taught in grammar and not taught in mathematics. in fact, it's hard to imagine a greater waste of time in a mathematics/arithmatic course.
              • 4. Re: Max Text in Textbox
                IreDevil Level 1
                quote:

                Originally posted by: Rothrock
                Also if the number is supposed to be 4,370,010 I was taught that should be:

                Four million three hundred seventy thousand ten

                Ands were only to be used to denote the decimal point as in (49.5)

                Fortynine and five tenths

                I had a middle-school math teacher who really was quite mean about it. What were you taught kglad?

                As for the number of characters in text, there may be a limit, but you are a long ways from it. Numbers like 65536 jump into my head. (Although I have no specific knowledge that would make me say that.) Another thing that might be happening is that you are getting an invisible return at the end of the input string? So check for that.


                How do i check for invisible return? What does invisible return means?'
                • 5. Re: Max Text in Textbox
                  kglad Adobe Community Professional & MVP
                  it means there's a carriage return after the last character. if you watch your output panel carefully you'll notice the text from the textfield isn't on the last line of the output panel.

                  it's easy to miss that though so i find it easier to check the text.length property and see if that matches the number of visible characters and expected spaces.