From: Robert C. <rob...@gm...> - 2005-03-22 00:42:44
|
Hi Steve, The mvIO class has a setLocalEcho(boolean) method to switch on and off local echoing. If somehow you could find out from the telnet daemon wherher to do echoing then all you need to do is call this method to enable or disable local echoing. Ages ago i think i looked at it quickly but with the old version of the telnet daemon could not see how to determine echo status. This might be fixed in latest versions of the telnet daemon. - Robert On Sun, 20 Mar 2005 16:29:24 -0800, Steve Ritchie <wb...@co...> wrote: > > It would be best to not have any kind of echo for the IN statement for now > (until ECHO ON/OFF are fully supported). By allowing the echoing of ASCII > codes (having no choice) when using 'IN' prevents being able to program any > kind of graphical menu or word/line processor. This was my roadblock until I > commented out the echo on the mvIO class as follows: > > /** > * Returns a single character from the input buffer > * @param result the character > * @param ordinal whether to return ordinal value rather than char > itself > */ > public mvString IN(mvString result, boolean ordinal) throws mvException > { > result.clear(); > int ch = 0; > try { > if (ordinal) { > ch = in.read(); > // if (!localecho && echo) screen.PRINT(ch); > result.set(ch); > } else { > ch = in.read(); > // if (!localecho && echo) screen.PRINT(ch); > result.set((char)ch); > } > return result; > } catch (java.io.IOException e) { > throw new mvException(0, e); > } > } |