hxnodejs icon indicating copy to clipboard operation
hxnodejs copied to clipboard

Sys.getChar

Open NQNStudios opened this issue 3 years ago • 2 comments

I have been using IHx's ConsoleReader class to make REPLs within Haxe that can save their command history and navigate between it. I expected this to work when compiling for NodeJS, but got the exception that Sys.getChar() isn't implemented in hxnodejs. Could it be?

I see here that it was stubbed this way three years ago and hasn't been touched since. If the implementation is easy enough, I could do it and PR.

NQNStudios avatar Jul 27 '20 18:07 NQNStudios

I see according to this StackOverflow that it isn't trivial, but there is an npm module for getchar:

https://github.com/kspalaiologos/getchar#readme

I don't know if hxnodejs has a rule against adding any dependencies other than Node itself.

NQNStudios avatar Jul 27 '20 18:07 NQNStudios

Another way of resolving my issue would be to declare Sys.sleep as dynamic, so I could implement it myself in my library

NQNStudios avatar Sep 05 '20 18:09 NQNStudios