Gjs run() function blocks execution of code after that



Hi,

I'm working on creating a Proof of Concept that Gtk widgets can be built and managed using Gjs as React.js and I'm almost there, but there is a problem. Generally, after the application is launched (the run() function is called on the gtkApplication object) the application window appears and rest of code (after that line) is not executed until the application is closed. I guess some loop is initialized by the run() function and rest of code is executed when this loop is broken. 

I know the callbacks of signals are executed but it's not enough because when I create a React component and want to change its state, I'm calling the standard setState(...) function which is asynchronous and unfortunately this function is not executed until the application is closed/the loop is broken.
Can it be solved somehow? Is there a function pausing this loop? Or have you any suggestion how to solve that problem?

Thanks!
Łukasz Godlewski


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]