Re: Unicode support for Windows 10 console

2020-06-14 Thread ktamp
I think we are here: [https://stackoverflow.com/a/5558123](https://stackoverflow.com/a/5558123) > Depending on your OS, the command line input will only accept 8191 characters > for XP and 2047 characters for NT and Windows 2000. Under **Windows 10** , console input using **fgets /fgetws** is s

Re: Simple gui app with threadpool

2020-06-14 Thread elo
@jackhftang looks promising :) I haven't seen this library before (unfortunately awesome nim is not updated). I'm sure I'll try to use it @aguspiza2 ah, now it's all clear ;) I saw libui, but it looked 'unfriendly' compared to nigui (at least for me) but, of course, i also try. Thanks for expla

Re: Simple gui app with threadpool

2020-06-14 Thread jackhftang
If your threads are long-living and you are okay to talk in json between threads. You can make use of threadproxy library. import strutils import nigui import os import threadproxy proc workerMain(proxy: ThreadProxy) {.thread.} = proxy.onData "task1":

Re: Simple gui app with threadpool

2020-06-14 Thread aguspiza2
If you do ^t just after spawn, you are effectively not using the worker thread as the UI thread is blocked waiting the worker thread to finish. What you should do is to spawn a thread and inside the worker thread notify the UI thread that "t" is ready, so UI thread can then update "textArea". T

Simple gui app with threadpool

2020-06-14 Thread elo
Hi. I'm trying to make a simple gui app that performs functions at the press of a button. Of course, func is called in the main thread, so gui is freezing. I tried use the threadpool module, but I do something wrong. From what I understood, to read the result from thread, I have to use ^, but th

Re: Can't access fields of object returned by a procedure

2020-06-14 Thread ameerwasi
For anyone visiting, I just had to make my fields public and everything worked. This is the code, I changed import position type Error* = object pos_start* : position.Position pos_end* : position.Position name*: string details*: string