Hi, semi-beginner with NIM, like it a lot but still need to get used to rather 
new way, for me, to structure the programs. I'm attempting to port to NIM an 
application written in Python. The application receives inputs both from a GUI 
and from a socket whose messages are used to update the GUI status (widgets 
colors, labels etc).

Here's where I need a bit of advice on how to proceed:

Any GUI library (now I'm tinkering with nimx, but the pattern is general of 
course) has its own event loop. But also receiving input from a socket requires 
a runForever() if you're using an asyncSocket, and even (I think) if you create 
a Thread and wait for info appearing on a channel. I can see no way forward and 
I'm sure I'm missing something or making wrong assumptions. What is the common 
pattern to make the two event loops coexist, or how to get rid of the one under 
my control, the network inflow related event loop ?

Thank you very much for any advice on this.

BTW, since I'm here I'll pinpoint a nice, OpenGL based, GUI library here 
[https://github.com/mitsuba-renderer/nanogui](https://github.com/mitsuba-renderer/nanogui)
 I'm not involved with the project, just a user. It is nice looking, well 
documented, comes with compiled python bindings which work like a charm with 
nimpy. I managed to port to nim/nimpy the whole example1.py which showcases 
100% of the widgets (couldn't test only the shaders functions, they use numpy 
and I still struggle with that part of nim/nimpy syntax)

Nanogui also poses to me the same event loop question...

Reply via email to