TaifunTextBoxStartEnterPressed Event doesn't fire

I'm using TaifunTextBox extension to add some features to my textboxes. One of those is the EnterPressedListener. But I can't get it to work.

Setup in Screen.Initialize:

Using the EnterPressed event:

The idea is to hide the keyboard when the enter key is pressed in order to show the part of the page which is covered by the keyboard again. But it doesn't happen. I also don't see the debug message, meaning that the event doesn't fire.
The enter key on the keyboard has the down/left arrow icon, but I suppose it doesn't matter which icon is shown?

Please show your all blocks clearly

get an image of your blocks (→ right mouse click in Blocks area)

Which part is not clear? The app contains over 5000 blocks. The ones shown are the only ones related to the EnterPressed Event.

If not mistaken this option is for using other keys as enter in case no enter is available, try to set icon to NEXT

Just tried the same using a NUM keybord on a different arrangement. There the event works (the enter icon is a checkmark).

In screen.initialize:

Handling the event:

Doesn't work. I always get the "return" icon. I tried setting it to 'NEXT' and 'DONE'.



I believe it won't work cause this is a regular enter key . See example in PuraVidaApps (image taken from site)

That may be the case. But like I said, I can't change the key's icon.

Tried it with a NUM keyboard, that seems to work. Doesn't work using the text keyboard.




do you have issues with the EnterPressed event or setting the SoftKeyboard icon?
Does the Textbox Enter Pressed test project downloadable from here https://puravidaapps.com/textbox.php work for you?
also usually I woud use the extension only once and use several if then else statements in the events to trigger different actions depending on the textbox


I have issues with both. I tried your test project and that works fine. I moved the creation of the event listeners to screen1.init (as I do in my app) and it still works fine.
I'll try if reducing the event handlers to one and using the if/then approach makes a difference.
To be continued...

BTW, does the call to StartxxxListener not create a new instance of the event listener every time the call is made and therefore cause multiple calls to handle the event when the event occurs? This is definitely the case in C#, but apparently not in AI ?

Finally found the cause for this behaviour. Using single or mutiple instances of the TaifunTexbox is not relevant. The root cause is that my textbox was configured to be multi-line in the designer. Took me a while before I noticed it. That also explains why changing the icon has no effect. In a multi-line textbox the Enter button always keeps the "return" icon, regardless of what you want it to be.

Thanks for the hints.

1 Like