Re: Calling GUI function from Thread



Taha,

here is some more I think nice sample code for using a Glib::Dispatcher with 
Gtk.

http://www.c-plusplus.de/forum/viewtopic-var-p-is-816067.html


Chris

http://www.acurana.de/



Am Samstag 08 September 2007 11:13:41 schrieb Taha Ali:
> Hi,
>
> I am facing problem in calling a gui function from a thread. It goes this
> way. The thread is calling an API function which is taking around 15
> seconds to execute. During execution this function itself uses a callback
> funtion (which I have regisated in the beginning of the program with the
> library I am using) for continuously reporting the progress. I am trying to
> set_text these messages in a label but after first normal execution of this
> thread, the gui hangs on the next call.  I am creating the thread on
> button_clicked event. I am also using Glib::Dispatcher for communicationg
> with the GUI thread from my worker thread but all the tricks are failing.
> When I dont try to set_text any thing from this callback function, it works
> just fine showing me the display (std::cout) on the screen.
>
> Need help.
>
> Thanks and Regards,
> Taha




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