- catch the on after edit event and put the query string (get edited text) into 
a (hidden) variable 1
- set timer (in my experience, a short timer does the trick, e.g. 3 ticks)
- in the on timer event, compare the value of the hidden variable 1 to the 
value of hidden variable 2

If the content of variable 1 is the same as variable 2 put the timer to zero 
and perform the query;
Else, put the content of variable 1 into variable 2 and keep the timer running 
(user is still typing).

Works well, I use this technique in all my selectors:

https://flury-software.ch/a-swiss-army-knife-for-4d/

e.g. in the home section of the explorer have a look at the folder "PopUp 
Selector"

To see the poup in action, execute the method "UI_Test". It first parses a 
60000 row address file (uncompiled it takes some seconds, compiled is much 
faster) in order to prefill the popup in the test form. Selecting an address is 
very fast, even with a multi criteria search, e.g. "paul alvarez". The test 
form also demonstrates the use of the other selectors.

Olivier

-----Ursprüngliche Nachricht-----
Von: 4D_Tech <4d_tech-boun...@lists.4d.com> Im Auftrag von Chip Scheide via 
4D_Tech
Gesendet: Samstag, 20. Juli 2019 00:38
An: 4d_tech@lists.4d.com
Cc: Chip Scheide <4d_o...@pghrepository.org>
Betreff: Re: How to Catch Paste Action

Thanks!

I need the timer to trigger the lookup -
ex: 
Criteria -> Fred <user stops typing for .5 sec> execute lookup on 'Fred'

want to do the same with pasted data 



> Chip,
> 
> Try using On After Edit event in your enterable object. That should 
> work without involving On Timer event. However, you will need to use 
> Get edited text command to get the data.
> 
> HTH,
> Add
> 
> 
> 
> 
> On 7/19/19, 2:59 PM, "4D_Tech on behalf of Chip Scheide via 4D_Tech" 
> <4d_tech-boun...@lists.4d.com on behalf of 4d_tech@lists.4d.com>
> wrote:
> 
>     I have a variable in which the user enters search criteria.
>     They can paste from elsewhere also (as it is just text).
> 
>     everything works as I want when typing, but nothing happens when the
>     user pastes, until they tab or click outside of the entry area.
> 
>     I would like to catch the paste action, and set a timer (which is what
>     happen with typing), to trigger the search.
> 
>     Thanks
>     Chip
>     ------------
>     Hell is other people
>          Jean-Paul Sartre
>     **********************************************************************
>     4D Internet Users Group (4D iNUG)
>     Archive:  http://lists.4d.com/archives.html
>     Options: https://lists.4d.com/mailman/options/4d_tech
>     Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
>     
> **********************************************************************
> 
> **********************************************************************
> 4D Internet Users Group (4D iNUG)
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **********************************************************************
------------
Hell is other people 
     Jean-Paul Sartre
**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

Reply via email to