Re: About the time control under gtkmm-2.4
- From: Antonio Coralles <noche suapie reflex at>
- To: gtkmm-list gnome org
- Subject: Re: About the time control under gtkmm-2.4
- Date: Mon, 20 Jun 2005 00:20:10 +0200
jerry wrote:
> Antonio Coralles wrote:
>
>>jerry wrote:
>>
>>
>>
>>>Hi, all
>>>I'd like to call a special function periodically in my program , and I
>>>find it in google that a function called
>>>Glib::signal_timeout().connect(***) can manage this. However it's
>>>defined in gtkmm-2.2 and I can't find a similar function in gtkmm-2.4.
>>>What's the corresponding function in gtkmm-2.4 then? Is there any
>>>example code for this?
>>>Thank you in advance.
>>>
>>>
>>>
>>Try
>>http://www.gtkmm.org/docs/glibmm-2.4/docs/reference/html/classGlib_1_1SignalTimeout.html
>>.
>>Antonio
>>
>>_______________________________________________
>>gtkmm-list mailing list
>>gtkmm-list gnome org <mailto:>
>>http://mail.gnome.org/mailman/listinfo/gtkmm-list
>>
>>
>>
> Thank you.
>
> I've solved it by adding #include <gtkmm.h>
>
> But when I create the slot function, it claims that:
>
> cd /home/jerry/Projects/code/
> g++ `pkg-config gtkmm-2.4 --cflags --libs` playctl.cc -c
> /usr/include/sigc++-2.0/sigc++/object_slot.h: In function `
> SigC::Slot0<T_return> SigC::slot(T_obj1&, T_return (T_obj2::*)()) [with
> T_return = bool, T_obj1 = PlayCtl, T_obj2 = PlayCtl]':
> playctl.cc:100: instantiated from here
> /usr/include/sigc++-2.0/sigc++/object_slot.h:29: error: cannot
> dynamic_cast `
> +_A_obj' (of type `class PlayCtl&') to type `struct SigC::Object&' (source
> type is not polymorphic)
>
> Compilation exited abnormally with code 1 at Sun Jun 19 18:52:57
>
>
> My code is "Glib::signal_timeout().connect(SigC::slot(*this,
> &PlayCtl::second_passed), 1000);", where PlayCtl is a class defined by
> myself.
>
> How can I make it able to be dynamic_cast?
Just forwarding this to the list as you have unintentionally only
replied to me and I've idea what could be wrong in your code at the
moment ...
Antonio
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]