On 28 Jun 2017, at 12:01 pm, David Adams via 4D_Tech <4d_tech@lists.4d.com> wrote: > > On Wed, Jun 28, 2017 at 11:54 AM, Wayne Stewart via 4D_Tech < > 4d_tech@lists.4d.com> wrote: > >> Hi, >> >> I did it with help from Dave Batton (so you can imagine how fresh this >> solution is)! >> >> The way it works is this and you will laugh/wince. >> > > Dang, I'm kind of impressed. That's actually a lot easier than a lot of > solutions would be! I guess that you could set it up to be pretty easy to > copy and paste between forms and then just tweak it a bit for the target > object. Hmmm.
Hey David We do it using ON EVENT CALL to trap the keystrokes. Slightly less clunkier than Wayne's approach but to be fair I'm not a huge fan of ON EVENT CALL. Its scope is application wide so you need to take care to disable it or uninstall it when the window you need it for no longer has the focus. Which way to go depends on your particular situation. We use an event handler pretty much continuously in our appointments book and we found that it was better to enable/disable it (with accessor methods on an IP var) rather than uninstall it and re-install it every time the window loses/gains focus. The event handler is actually instantiated by 4D as a separate local process so we were creating and destroying the process more or less continuously, i.e. every time the user did anything other than type a keystroke. Certainly if 4D were to make it a listbox option we would breathe a little easier. :) cheers J ********************************************************************** 4D Internet Users Group (4D iNUG) FAQ: http://lists.4d.com/faqnug.html Archive: http://lists.4d.com/archives.html Options: http://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **********************************************************************