by alasham.said@[EMAIL PROTECTED]
May 5, 2008 at 05:23 AM
On May 4, 1:50 am, "jalqa...@[EMAIL PROTECTED]
" <jalqa...@[EMAIL PROTECTED]
> wrote:
> I would like to add a signal to a Gtk::Entry object, but for some
> reason this gives me bunch of errors saying that it is
>
> D:\XWin\include\sigc++-2.0\sigc++\adaptors\adaptor_trait.h|84|error:
> no match for call to `(sigc::bound_mem_functor0<bool, jv+e::Entry>)
> (GdkEventFocus* const&)'
>
> I using Gtkmm 2.10.x for Windows
> Thanks in advance!
>
> Can any body help?!
> namespace jve{
> class Entry: virtual public Gtk::VBox {
>
> .......
> Gtk::Entry* text_box;
> public:
> Entry();
> .........
> void onBlanck();};
> }
>
> jve::Entry::Entry(){
> ....
> text_box = Gtk::manage(new Gtk::Entry());
> text_box->signal_focus_out_event().connect(sigc::mem_fun(*this,
> &Entry::onBlank)); <== here is the problem
> ....}
>
> bool jve::Entry::onBlank(){
> ....
> // Display a Dialogbox explaining the problem
> ....
> //! recapture the focus
> text_box->grab_focus();
> return false
>
> }
Hello,
This is a GTK-specific question. Please have a look here:
http://gnome-fresh-news.blogspot.com/2008/05/re-how-to-use-signal_644.html
Regards.