Textfield weirdness...

Hello,

I’m kind of confused on one of the Textfield methods.
I’m entering text but the text is inputting into the box in reverse.
I thought it was a problem with my trackpad and I disabled that.
For example I enter www.xojoblog.com and it’s coming out of the Textfield as moc.golbojox.www.
It’s not my keyboard as obviously I’m able to type this information.

I appreciate your assistance.

Hello,
Sorry, I forgot to mention important setup information.
This is after compiling the Tutorial example and entering the text while the example executes…

Thanks,

The only thing I can think of that would do this is a system keyboard language setting for a language that’s right-to-left. I’ve seen direction handled automatically on Mac.

But other than that, Xojo doesn’t even have a built in string-reverse function; if you need it you have to implement that yourself (or use the m_String module from Kem)

Do you have an example project that exhibits the problem that we can peek at?

Are you just “typing” and letting the TA do the work?
or are you intcepting the keystrokes and updating it yourself.
or doing what Tim just said :slight_smile:

I’m typing into the finished compiled executable into the text box of the Tutorial desktop example and when I type the letters are entered from left to right backwards. The cursor wont leave the left side of the box.

Okay, I just removed an Event handler SelChange that had a URLField.Text = Me.Text
Now it almost works correctly, very weird.

The TextChange Event handler was used to save the Text entered into the Textfield into a listview.

The cursor keys work now but the text is still entering backwards. The cursor can be moved to the end of the text entered but always returns to the first position. No other options set in the Textfield but what the tutorial said to do.

I’m not sure how to post the code online.

It’s not a bad system. It would be nice if the text editing works. I’ll retry entering the example to see if it’s a fluke.

Thanks for your help!

is there any code that manipulates SELSTART?
or adds a character to the textarea content (KEYDOWN?)
either or both of those if not used properly can manifest itself as the symptoms you are observing

So just to be sure I’m understanding, this was the result of non-default text handling?

I just redid the steps from the desktop tutorial and it’s a bit confusing as to which Event the select Change from the Event handler list. There’s Textchange and SelChange and I got a bit confused is it Select Textchange or is it the text for the expanded Sel_ectChange Event? It looks like the Select Change event is causing the text to enter in reverse. I was testing the input on the textfield before I attached the Select Change event handler. Once I added the handler plus the text URLField.Text = Me.Text the box is reversing my text. It did not reverse the text before that.

This all from the desktop tutorial.

Sorry the event handler was supposed to be added to the Listbox NOT the Text_Field input.

The event handler was “Change” and not SelChange or TextChange which I was trying to use.

I just realized it…

That explains the Text_Field input acting so weird.

That’s why the text was being reversed.

Sorry for my confusion.

Thanks for your help!

Nice program! It’s very responsive and other than my “user” related issues seems a benefit.