svyKeyListener - Not Working Locally

Forum to discuss the new web client version of Servoy.

svyKeyListener - Not Working Locally

Postby bcusick » Sat Sep 08, 2018 10:18 pm

Hey Guys,

I went up to (the AMAZING) demo.servoy.com and had a look at the svyKeyListener example. COOL.

Downloaded the sample file, downloaded the svyKeyListener into the Web Packages (via the web package manager).

When I open the solution and click the "Add Listener to search field" button - and then start typing - nothing happens.

Also, I noticed the example - it was using the object rather than a string when adding it:

Code: Select all
plugins.keyListener.addKeyListener(elements.pw,onKey);


I thought it was supposed to be:
Code: Select all
plugins.keyListener.addKeyListener("pw",onKey);


Can anyone suggest where I went wrong? :)
Bob Cusick
bcusick
 
Posts: 1224
Joined: Wed Apr 23, 2003 11:27 pm
Location: Thousand Oaks, CA USA

Re: svyKeyListener - Not Working Locally

Postby bcusick » Mon Sep 10, 2018 10:51 pm

OK - figured it out.

Turns out the DOCS ARE WRONG. You need to specify a component - NOT a string:

THIS:
Code: Select all
plugins.keyListener.addKeyListener(elements.fld_key,onKey);


NOT THIS:
Code: Select all
plugins.keyListener.addKeyListener("fld_key",onKey);
Bob Cusick
bcusick
 
Posts: 1224
Joined: Wed Apr 23, 2003 11:27 pm
Location: Thousand Oaks, CA USA


Return to Servoy NGClient

Who is online

Users browsing this forum: No registered users and 2 guests