Re: Gtkmm and thread's question?
- From: klaus triendl <klaus triendl eu>
- To: gtkmm-list gnome org
- Cc: lovelinux <xiaoaojianghu_ai 163 com>
- Subject: Re: Gtkmm and thread's question?
- Date: Mon, 27 Oct 2008 09:25:47 +0100
lovelinux schrieb:
> void MainFrame::on_timer(){
> Gtk::Window *window;
> window=(Gtk::Window*)(get_toplevel());
> Gtk::MessageDialog dlg(*window,"ok!");
> dlg.set_title("ThreadGUI");
> dlg.run();
> }
>
> build is success,but running begin thread is error:
> Locking assertion failure Backtrace.............
Do not access GUI stuff from another thread than the "GUI"-thread (which
is normally the main thread)!
Rather send a message from the 2nd thread to the main thread by using
Glib::Dispatcher or the sigx++ library that gives you a whole framework
for such tasks...
Klaus
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]