A simple plugin to associate keyListener’s callback Functions to Servoy’s field.
It’s free (LGPL) and comes with full source code.
You can find it on this new Servoy related web site.
A simple plugin to associate keyListener’s callback Functions to Servoy’s field.
It’s free (LGPL) and comes with full source code.
You can find it on this new Servoy related web site.
Hi Patrick,
Is the plugin supposed to work with Servoy 6?
It looks like typing a character in a field sometimes causes the field to lose focus - onFocusLost is fired by Servoy as soon as I type.
Then I’m unable to type anything else because whatever I type gets wiped off. For example, if I set the listener to listen to keyReleased and hit a key without releasing it then the character is typed but as soon as I release the key it disappears.
This does not happen in Servoy 5 so I am wondering if there is a known issue.
Cheers,
Maria
I’m not aware of a specific problem with Servoy 6.
Please open a case on ServoyForge, with a small sample solution, and I will have a look.
Thanks,
there is a change between 5 and 6 regarding this.
What we now do is call something that makes sure that the ui state is pushed to the data (but it shouldn’t really loose focus…) when a execute method happens from plugin code.
Else not all the ui state was pushed to the data layer when the method did execute
jcompagner:
there is a change between 5 and 6 regarding this.What we now do is call something that makes sure that the ui state is pushed to the data (but it shouldn’t really loose focus…) when a execute method happens from plugin code.
Else not all the ui state was pushed to the data layer when the method did execute
Well, I created a sample solution. It calls onFocusLost when the first character is typed in the field.
The rest of my trouble (like inability to type further) might be caused by something else but still the first hit in the field calls onFocusLost and that causes some fields that have onDataChange() event to execute those methods prematurely.
The focus goes back to the field but the event is still fired before that.
Sample solution attached, just type in the field and watch the console output for “onFocusLost”.
Cheers,
Maria
keyListeners.servoy (4.56 KB)
ptalbot:
I’m not aware of a specific problem with Servoy 6.Please open a case on ServoyForge, with a small sample solution, and I will have a look.
Thanks,
Patrick, I was unable to reproduce 100% of my trouble in a sample solution. Must be something in my code causing it.
Still the sample is attached that shows that onFocusLost is executed (please see the post above).
Cheers,
Maria
maria:
ptalbot:
I’m not aware of a specific problem with Servoy 6.Please open a case on ServoyForge, with a small sample solution, and I will have a look.
Thanks,
Patrick, I was unable to reproduce 100% of my trouble in a sample solution. Must be something in my code causing it.
Still the sample is attached that shows that onFocusLost is executed (please see the post above).Cheers,
Maria
Will have a look and see if I can do something at the plugin level to prevent that.
Hi Maria,
I’ve tested you sample with the latest keyListeners plugin and couldn’t reproduce the error, no ‘onFocusLost’ output here.
What OS and Java version are you using? Maybe it’s specific to your configuration?
[EDIT] You should read “couldn’t” reproduce the error.