[NTLK] NSBasic serial timeout handling

From: Karosa Alabaster <karosa_at_gmail.com>
Date: Thu Mar 02 2006 - 21:05:57 EST

Hello all,

I've been playing around with NSBasic for a while now and it seems I'm
either unable to grasp the concept of this behaviour or this is a
crippling bug.
basically what I do is:
1, set INPUT timeout to 10 seconds
2, set i/o to serial port
3, run INPUT on serial port
4, echo back the received data with PRINT
5, wait 10 seconds
6, repeat from step 3

And what happens is.. the second INPUT instantly returns with a timeout.
It's as if nothing stops the timeout timer and it just keeps going when
it is started with the first INPUT statement. Setting reqtimeout again
before the second input doesn't help either.
The timeout appears to also kill the serial session (which is another
bad behaviour in my opinion, but I guess it is intended)

Anyone have an idea how to manually stop and zero the timeout timer
after an input statement without having to cycle the i/o between screen
and serial? Any help would be greatly appreciated.
Hopefully it's not something painfully obvious, but if it is.. I'll
blame it on the time (3AM right now)

Thanks in advance everyone,
Cheers,
Alabaster

reproduce with this code:
10 environ EXTR.input.reqtimeout = 10000
20 environ io = "extr"
30 wait
35 print "Enter something"
40 input serdata
45 print "You entered:"&serdata
50 wait 10000
55 print "Enter something"
60 input serdata
45 print "You entered:"&serdata&" or maybe not"

-- 
This is the NewtonTalk list - http://www.newtontalk.net/ for all inquiries
Official Newton FAQ: http://www.chuma.org/newton/faq/
WikiWikiNewt for all kinds of articles: http://tools.unna.org/wikiwikinewt/
Received on Thu Mar 2 21:04:09 2006

This archive was generated by hypermail 2.1.8 : Mon Mar 06 2006 - 08:50:22 EST