Weird behaviour of shortcuts (window plugin) in 5.1.4

Hi all!

I’m in troubles with shortcuts in WebClient with Servoy 5.1.4…

Let’s see:

All shorcuts I define out of firstForm (first calling of createShortCut function) is executed 2 times!!!

For example,

Code in onShow of first form:

		plugins.window.createShortcut('ctrl 1', 'globals._ShortCut');
		plugins.window.createShortcut('ctrl 2', 'globals._ShortCut');
		plugins.window.createShortcut('ctrl 3', 'globals._ShortCut');		
		plugins.window.createShortcut('ctrl 4', 'globals._ShortCut');
		plugins.window.createShortcut('ctrl 5', 'globals._ShortCut');

Global function to handle shortcuts:

function _ShortCut(e)
{
application.output(e.getType() + '---')
application.output('-----------')
}

Code in openSolution:

		plugins.window.createShortcut('ctrl 6', 'globals._ShortCut');
		plugins.window.createShortcut('ctrl 7', 'globals._ShortCut');
		plugins.window.createShortcut('ctrl 8', 'globals._ShortCut');		
		plugins.window.createShortcut('ctrl 9', 'globals._ShortCut');

As result, the CTRL+6 (or 7, or 8, or 9) handler (_ShortCut) is executed 2 times! Shortcuts from 1 to 5 is working right.

This code was working properly in Servoy 5.1.3. It’s the expected behaviour?

P.S.: you can not check a breakpoint in the code to confirm the execution twice (changing enviroment to Developer seems solve this issue), but you can perform an application.output action

hi,

it works fine on my side, both with firefox (3.6.6) and ie 7;
can you reproduce this in a simple solution ?

regards,

I’m trying to reproduze in a simple solution… But, by now, I’m not getting it…

Clue: the code of onShow is in onShow of the login form that is in another module (maybe related on security login or being in another module???).

Hi!

At attachment, you can see a simple solution that reproduze the issue… As I said in last post, the onShow code is onShow function of login form (I said of first form in first post… :( )

Usage:

  • import solution (solution has ‘users’ group and ‘user’ user to perform login in login form) and run in WC
  • click login button
  • Type CTRL 1 (or 2, 3, 4, 5) → see output/console → it works right!
  • Type CTRL 6 (or 7, 8, 9) → see output/console → it doesn’t work right! Every key combination is executed twice…

This code worked properly in Servoy 5.1.3

Tips:

  • This issue is reproduzed with a solution with a module where:
  • login form is a form of module, and in this form (onShow) is set shortcuts from 1 to 5
  • first form is a form (main_my_sample_solution) of solution my_sample_solution
  • in onOpen of main solution (my_sample_solution) is set shortcuts from 6 to 9
  • login is required (mustAuthenticate is checked)

my_sample_solution.servoy (7 KB)

will be fixed in 5.2

I’m also trying to use this plugin in my case of an error in getType () of the following error: “undefined”

please help me

Hi, I’m now seeing your help question, about 4 times, on different topics

It does’nt help to shout out your problem everywhere, and do crosspostings about the same problem
be patient, most of us here are helping others in there (spare) free time… ;-)

if you want (paid) support, directly? contact Servoy or some 3th party, that can help you out.