[REBOL] Re: wait, events and ports - how they work together ?
From: anton:wilddsl:au at: 28-Jul-2006 15:26
I think the problem may be that you COPY the
result of WAIT.
COPY behaves differently when you pass it a port,
depending on the port/scheme.
Since WAIT can return either a port or none, I would
check its return value instead of assuming it is the
port I want.
Break the code apart like this:
port: wait serial-port
print ["type? port" type? port]
if port? port [
print ["port/scheme" port/scheme]
if port/scheme = 'serial [...]