Yes I know that this should be solved with a seperate thread and I now
have read the documentation for Glib::Dispatcher and understand the
basics of it, even though I don't understand why it doesn't allow arguments.
I also found an example for this with a lot of comments (in german, I
could translate it if you think that is simpler than writing another):
http://www.c-plusplus.de/forum/p816067
And to the poster: You were right, the implementation is really not
_that_ complicated :)
Am 01.08.2013 17:48, schrieb Alan Mazer:
Jonas, the suggested approach that I sent earlier uses a dispatcher to
avoid this problem, which I think is the preferred approach. Also,
the poster is trying to update a GUI window *asynchronously*. He
doesn't want to use timeouts, and he doesn't want it to be button
driven. I think that justifies the use of a separate thread.
-- Alan
On 8/1/2013 7:24 AM, Jonas Platte wrote:
It is quite simple to open another thread and call set_text of your
label from there. The problem is that this will probably crash your
program, as gtkmm is not thread-safe. That's why you need to make
sure that your set_text doesn't overlap with the gtk main loop that
updates the GUI.
And _that_ is the thing complicated to implement. At least I think
so. I never did this before, but you made me think about this once
again and it raised my interest, so eventually I will come up with a
solution later. Or somebody else will.
_______________________________________________
gtkmm-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/gtkmm-list
_______________________________________________
gtkmm-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/gtkmm-list