Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic What is the proper way to destroy a VirtualKeyboard? (Read 2998 times)
MFusion Swing KBoard
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 13
Joined: Apr 22nd, 2019
What is the proper way to destroy a VirtualKeyboard?
May 1st, 2019 at 7:53pm
Print Post  
Disposing of a parent component containing a VirtualKeyboard places the VirtualKeyboard into a strange state where it rapidly and repeatedly generates infinite keystrokes.  Setting the parent component to invisible appears to be a workaround, but I prefer to destroy the VirtualKeyboard.
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3146
Joined: Oct 19th, 2005
Re: What is the proper way to destroy a VirtualKeyboard?
Reply #1 - May 2nd, 2019 at 11:56am
Print Post  
Are you disposing the parent frame in response to keyboard's keyPressed event? Then the keyboard might not receive a mouseReleased message from whose handler it stops the auto-repeat timer.
  
Back to top
 
IP Logged
 
MFusion Swing KBoard
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 13
Joined: Apr 22nd, 2019
Re: What is the proper way to destroy a VirtualKeyboard?
Reply #2 - May 2nd, 2019 at 3:08pm
Print Post  
Good comment - thank you.  So, how best to dispose of the keyboard?
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3146
Joined: Oct 19th, 2005
Re: What is the proper way to destroy a VirtualKeyboard?
Reply #3 - May 3rd, 2019 at 8:01am
Print Post  
If that's the case, we'll add some method to stop the auto-repeat timer. Meanwhile try waiting for mouseReleased event before disposing the parent frame, the keyboard should stop it automatically at that point.
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3146
Joined: Oct 19th, 2005
Re: What is the proper way to destroy a VirtualKeyboard?
Reply #4 - May 3rd, 2019 at 8:14am
Print Post  
This build adds keyboard's own dispose method -
https://mindfusion.eu/_temp/JKeyboard.zip

Try calling it along with the frame's one.

Regards,
Slavcho
  
Back to top
 
IP Logged
 
MFusion Swing KBoard
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 13
Joined: Apr 22nd, 2019
Re: What is the proper way to destroy a VirtualKeyboard?
Reply #5 - May 3rd, 2019 at 10:53am
Print Post  
Thanks! I tried it and it works!!
« Last Edit: May 3rd, 2019 at 12:58pm by MFusion Swing KBoard »  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint