1. bug in get_key()

hi all,, 

in this code:

char = get_key()
 if (char = 'Q') then
   SendToServer(sock_connect[2],"QUIT :"&my_nick&" is done testing")
   puts(1,"you did a 'Q'uit\n")
   puts(logfile,"you did a 'Q'uit\n")
   flush(logfile)
   exit
 end if

there is a hang at get_key(),, and i didn't know there would be one, i thought 
it would return -1 if there was no key.

Kat

new topic     » topic index » view message » categorize

2. Re: bug in get_key()

Kat writes:
> there is a hang at get_key(),, and i didn't know there 
> would be one, i thought it would return -1 if there was no key.

get_key() should return -1 if no key was pressed.
However, in Windows I've observed that things like gaining or 
losing focus might occasionally cause it to wait until 
you press a key. 

If you have some repeatable, simple code that shows the problem,
please send it to me.

If it's critical, you might be better off writing an 
event-driven Win32Lib GUI application that detects
key presses.

Regards,
   Rob Craig
   Rapid Deployment Software
   http://www.RapidEuphoria.com

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu