signal handling



Hi another problem,
This time I cant seem to get the signal handeling to work.

Here is the code:

#ifndef _DOCDESIGN_H_
#define _DOCDESIGN_H_

#include <gtkmm/fixed.h>

class DocDesign : public Gtk::Fixed
{
public:
   DocDesign();
   virtual ~DocDesign();
   void on_enter_notify(GdkEventCrossing* event);

protected:
};

#endif //_DOCDESIGN_H_


#include "DocDesign.h"

DocDesign::DocDesign()
{
signal_enter_notify_event().connect(sigc::mem_fun(*this, &DocDesign::on_enter_notify)); // The editor(eclipse-cdt) says its this line.
}

DocDesign::~DocDesign()
{
}

void DocDesign::on_enter_notify(GdkEventCrossing* event)
{
// Do wathever }

Compiler output:

**** Incremental build of configuration Debug for project gDBDesigner ****

make -k all
Building file: ../main.cc
g++ -DXTHREADS -D_REENTRANT -DXUSE_MTSAFE_API -DXTHREADS -D_REENTRANT -DXUSE_MTSAFE_API -I/usr/include/gtkmm-2.4 -I/usr/lib/gtkmm-2.4/include -I/usr/include/glibmm-2.4 -I/usr/lib/glibmm-2.4/include -I/usr/include/gdkmm-2.4 -I/usr/lib/gdkmm-2.4/include -I/usr/include/pangomm-1.4 -I/usr/include/atkmm-1.6 -I/usr/include/gtk-2.0 -I/usr/include/sigc++-2.0 -I/usr/lib/sigc++-2.0/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/lib/gtk-2.0/include -I/usr/X11R6/include -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/freetype2/config -I/usr/include/atk-1.0 -O0 -g3 -Wall -c -fmessage-length=0 -omain.o ../main.cc
Finished building: ../main.cc

Building file: ../DocDesign.cpp
g++ -DXTHREADS -D_REENTRANT -DXUSE_MTSAFE_API -DXTHREADS -D_REENTRANT -DXUSE_MTSAFE_API -I/usr/include/gtkmm-2.4 -I/usr/lib/gtkmm-2.4/include -I/usr/include/glibmm-2.4 -I/usr/lib/glibmm-2.4/include -I/usr/include/gdkmm-2.4 -I/usr/lib/gdkmm-2.4/include -I/usr/include/pangomm-1.4 -I/usr/include/atkmm-1.6 -I/usr/include/gtk-2.0 -I/usr/include/sigc++-2.0 -I/usr/lib/sigc++-2.0/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/lib/gtk-2.0/include -I/usr/X11R6/include -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/freetype2/config -I/usr/include/atk-1.0 -O0 -g3 -Wall -c -fmessage-length=0 -oDocDesign.o ../DocDesign.cpp /usr/include/sigc++-2.0/sigc++/functors/slot.h: In static member function `static T_return sigc::internal::slot_call1<T_functor, T_return, T_arg1>::call_it(sigc::internal::slot_rep*, typename sigc::type_trait<T_arg3>::take) [with T_functor = sigc::bound_mem_functor1<void, DocDesign, GdkEventCrossing*>, T_return = bool, T_arg1 = GdkEventCrossing*]': /usr/include/sigc++-2.0/sigc++/functors/slot.h:130: instantiated from `static void*(* sigc::internal::slot_call1<T_functor, T_return, T_arg1>::address())(void*) [with T_functor = sigc::bound_mem_functor1<void, DocDesign, GdkEventCrossing*>, T_return = bool, T_arg1 = GdkEventCrossing*]' /usr/include/sigc++-2.0/sigc++/functors/slot.h:510: instantiated from `sigc::slot1<T_return, T_arg1>::slot1(const T_functor&) [with T_functor = sigc::bound_mem_functor1<void, DocDesign, GdkEventCrossing*>, T_return = bool, T_arg1 = GdkEventCrossing*]' /usr/include/sigc++-2.0/sigc++/functors/slot.h:1115: instantiated from `sigc::slot<T_return, T_arg1, sigc::nil, sigc::nil, sigc::nil, sigc::nil, sigc::nil, sigc::nil>::slot(const T_functor&) [with T_functor = sigc::bound_mem_functor1<void, DocDesign, GdkEventCrossing*>, T_return = bool, T_arg1 = GdkEventCrossing*]'
../DocDesign.cpp:5:   instantiated from here
/usr/include/sigc++-2.0/sigc++/functors/slot.h:122: error: void value not ignored as it ought to be
make: *** [DocDesign.o] Fout 1
Building file: ../WndMain.cpp
g++ -DXTHREADS -D_REENTRANT -DXUSE_MTSAFE_API -DXTHREADS -D_REENTRANT -DXUSE_MTSAFE_API -I/usr/include/gtkmm-2.4 -I/usr/lib/gtkmm-2.4/include -I/usr/include/glibmm-2.4 -I/usr/lib/glibmm-2.4/include -I/usr/include/gdkmm-2.4 -I/usr/lib/gdkmm-2.4/include -I/usr/include/pangomm-1.4 -I/usr/include/atkmm-1.6 -I/usr/include/gtk-2.0 -I/usr/include/sigc++-2.0 -I/usr/lib/sigc++-2.0/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/lib/gtk-2.0/include -I/usr/X11R6/include -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/freetype2/config -I/usr/include/atk-1.0 -O0 -g3 -Wall -c -fmessage-length=0 -oWndMain.o ../WndMain.cpp
Finished building: ../WndMain.cpp

make: Doel `all' niet opnieuw gemaakt vanwege fouten.
Build complete for project gDBDesigner




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