CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
Perl waiting for a function to finish

 



alexb
Novice

Aug 21, 2011, 2:20 AM

Post #1 of 3 (1536 views)
Perl waiting for a function to finish Can't Post

Hello,

I have wrote a TK (GUI) program in perl, and in one of the fields I have made a filter line which filters a listbox according to the input given.
I have binded the filter entry to a KeyPress, so everytime I enter a character it filters the listbox.
There is a problem I am having, since everytime I enter a character it enters a function which filters the listbox, it takes time and when I enter characters fast enough,
the program doesn't finish the function and the function runs parallelly so it doesn't do the filtration I want, and if I enter characters slow enough it works just fine.

Is there a way to make the second, enterance to the function wait for the first call to finish before starting to execute parallelly?


FishMonger
Veteran / Moderator

Aug 21, 2011, 7:30 AM

Post #2 of 3 (1528 views)
Re: [alexb] Perl waiting for a function to finish [In reply to] Can't Post

At the beginning of the function it should disable the input field and re-enable it at the end.


alexb
Novice

Aug 22, 2011, 5:31 AM

Post #3 of 3 (1462 views)
Re: [FishMonger] Perl waiting for a function to finish [In reply to] Can't Post

Thanks,

That is exactly what I finally did =)

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives