I have a text area. When I click a button it takes the text from the text area and saves it to a database. The problem is that I have to click outside the text area before clicking the button or it won’t read the text. I worked around the problem by setting the focus to an invisible text field, but that hardly seems right. Am I missing something?
Xojo / OS
Windows 10. I don’t have the computer on, but I just downloaded it two weeks ago, so I assume it’s the current version. It’s not a big deal. I got it working. It just seems that it shouldn’t work that way.
It shouldn’t and appears to not do that elsewhere.
A click outside the TextArea do nothing excepted if you write code and trap that click (clears the TextArea Focus for example).
Try to create a new project, add a TextArea and a button and add code in the button to copy the TextArea contents into the Clipboard.
Does it works ?
Also, you do not show the used code to create the New Data Base Record…
I found the problem for anyone who may experience this issue. If you type text into a text field or text area and then click a button it will read the text (if that is what your code does, of course). If you paste text in from the clipboard and click the button it will not read the text until you click elsewhere first. I don’t know why this happens, but I reproduced the results several times.
If you’ve reproduced the results in a small simple project, you should file a ticket. I can’t say that I’ve seen that behavior and am very curious about the implementation that makes it happen.