No text entered in fields upon keypresses

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
montymay
Posts: 145
Joined: Thu Jul 18, 2013 5:23 am

No text entered in fields upon keypresses

Post by montymay » Sun Oct 28, 2018 1:46 am

Hi

I have encountered a problem in my project that I can't fix after trying solutions on my own.

In the IDE, when I go from one card to another for the first time and type in an unlocked field that was given focus by script, or click in an unlocked field, text appears normally as I press keys, but when I leave the card and return to it, no characters are entered in the focused field or any other focused field as I press the keys. If I save the stack, or open and close the script editor of any control, or even just select the focused field or indeed any control at all on the card in edit mode and return to browse mode, the problem is fixed: I can enter text in fields when before I could not. There are no keydown, keyup, etc. handlers that could be trapping the keydown message, as far I as know. There is a grouped control on the card that has a keydown handler that adjusts the heights of the grouped fields within it when text is entered, but (1) the script for the group has a keydown handler that passes the event and (2) this behavior occurs in fields outside the the grouped control. Any suggestions would be much appreciated.

Monty

montymay
Posts: 145
Joined: Thu Jul 18, 2013 5:23 am

Re: No text entered in fields upon keypresses

Post by montymay » Sun Oct 28, 2018 6:39 am

P.S.

I am thinking now the cause is not the script, for why would selecting and deselecting any object on the card allow me to type text into a field. Even switching to edit mode and back to browse mode fixes the problem.

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: No text entered in fields upon keypresses

Post by bogs » Sun Oct 28, 2018 1:58 pm

Well, the first question I would have would be does this happen in a new blank project set up similarly, but that has no code? That would confirm your hypothesis in the 2nd post :)
Image

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7238
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: No text entered in fields upon keypresses

Post by jacque » Sun Oct 28, 2018 5:41 pm

It sounds like the stack doesn't have focus. If clicking anywhere on it with the browse tool fixes the problem then that's probably the case. Then we have to figure out what's stealing the focus.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”