Re How can be signal_remove() used on Window? For Guillaume Brocker



Dimitri Holz a écrit :
(*this      is  an  Gtk::Window )
this->signal_remove().connect(sigc::mem_fun(*this,&MainView::OnRemovedWindow));

Hi !

You dereferenced the "this" pointer where you should note. Here is the version that might compile : this->signal_remove().connect(sigc::mem_fun(this,&MainView::OnRemovedWindow));

Best regards.

Guillaume


Whithout dereferencing the "this" pointer I became this error:






make all
Build für Datei wird erstellt: MainView.cpp
Aufruf des GCC-C++-Compilers
g++ -I"/cygdrive\d\Eigene_Dateien\dholz\MyWorkspace\CanActorAPI\FTDI-Treiber\bin" -I"/cygdrive\d\Eigene_Dateien\dholz\MyWorkspace\CanActorAPI\src" -I"/cygdrive\c\Programme\Gemeinsame Dateien\GTK\include\gtkmm-2.4" -I"/cygdrive\c\Programme\Gemeinsame Dateien\GTK\include\cairomm-1.0" -I"/cygdrive\c\Programme\Gemeinsame Dateien\GTK\lib\gtkmm-2.4\include" -I"/cygdrive\c\Programme\Gemeinsame Dateien\GTK\include\glibmm-2.4" -I"/cygdrive\c\Programme\Gemeinsame Dateien\GTK\lib\glibmm-2.4\include" -I"/cygdrive\c\Programme\Gemeinsame Dateien\GTK\include\gdkmm-2.4" -I"/cygdrive\c\Programme\Gemeinsame Dateien\GTK\lib\gdkmm-2.4\include" -I"/cygdrive\c\Programme\Gemeinsame Dateien\GTK\include\pangomm-1.4" -I"/cygdrive\c\Programme\Gemeinsame Dateien\GTK\include\atkmm-1.6" -I"/cygdrive\c\Programme\Gemeinsame Dateien\GTK\include\libglademm-2.4" -I"/cygdrive\c\Programme\Gemeinsame Dateien\GTK\lib\libglademm-2.4\include" -I"/cygdrive\c\Programme\Gemeinsame Dateien\GTK\include\gtk-2.0" -I"/cygdrive\c\Programme\Gemeinsame Dateien\GTK\include\sigc++-2.0" -I"/cygdrive\c\Programme\Gemeinsame Dateien\GTK\lib\sigc++-2.0\include" -I"/cygdrive\c\Programme\Gemeinsame Dateien\GTK\include\glib-2.0" -I"/cygdrive\c\Programme\Gemeinsame Dateien\GTK\lib\glib-2.0\include" -I"/cygdrive\c\Programme\Gemeinsame Dateien\GTK\lib\gtk-2.0\include" -I"/cygdrive\c\Programme\Gemeinsame Dateien\GTK\include\pango-1.0" -I"/cygdrive\c\Programme\Gemeinsame Dateien\GTK\include\cairo" -I"/cygdrive\c\Programme\Gemeinsame Dateien\GTK\include\atk-1.0" -I"/cygdrive\c\Programme\Gemeinsame Dateien\GTK\include" -I"/cygdrive\c\Programme\Gemeinsame Dateien\GTK\include\libxml2" -O0 -g3 -Wall -c -fmessage-length=0 -mms-bitfields -mno-cygwin -MMD -MP -MF"deps/MainView.d" -MT"deps/MainView.d" -o"obj/MainView.o" "MainView.cpp" /cygdrive/c/Programme/Gemeinsame Dateien/GTK/include/sigc++-2.0/sigc++/adaptors/adaptor_trait.h: In member function `typename sigc::adaptor_functor<T_functor>::deduce_result_type<T_arg1, void, void, void, void, void, void>::type sigc::adaptor_functor<T_functor>::operator()(T_arg1) const [with T_arg1 = Gtk::Widget* const&, T_functor = sigc::bound_mem_functor0<void, MainView>]': /cygdrive/c/Programme/Gemeinsame Dateien/GTK/include/sigc++-2.0/sigc++/functors/slot.h:136: instantiated from `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_functor0<void, MainView>, T_return = void, T_arg1 = Gtk::Widget*]' /cygdrive/c/Programme/Gemeinsame Dateien/GTK/include/sigc++-2.0/sigc++/functors/slot.h:144: instantiated from `static void*(* sigc::internal::slot_call1<T_functor, T_return, T_arg1>::address())(void*) [with T_functor = sigc::bound_mem_functor0<void, MainView>, T_return = void, T_arg1 = Gtk::Widget*]' /cygdrive/c/Programme/Gemeinsame Dateien/GTK/include/sigc++-2.0/sigc++/functors/slot.h:529: instantiated from `sigc::slot1<T_return, T_arg1>::slot1(const T_functor&) [with T_functor = sigc::bound_mem_functor0<void, MainView>, T_return = void, T_arg1 = Gtk::Widget*]' /cygdrive/c/Programme/Gemeinsame Dateien/GTK/include/sigc++-2.0/sigc++/functors/slot.h:1157: 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_functor0<void, MainView>, T_return = void, T_arg1 = Gtk::Widget*]'
MainView.cpp:299:   instantiated from here
/cygdrive/c/Programme/Gemeinsame Dateien/GTK/include/sigc++-2.0/sigc++/adaptors/adaptor_trait.h:84: error: no match for call to `(sigc::bound_mem_functor0<void, MainView>) (Gtk::Widget* const&)' /cygdrive/c/Programme/Gemeinsame Dateien/GTK/include/sigc++-2.0/sigc++/functors/mem_fun.h:1787: note: candidates are: T_return sigc::bound_mem_functor0<T_return, T_obj>::operator()() const [with T_return = void, T_obj = MainView] /cygdrive/c/Programme/Gemeinsame Dateien/GTK/include/sigc++-2.0/sigc++/adaptors/adaptor_trait.h:84: error: return-statement with a value, in function returning 'void'
make: *** [obj/MainView.o] Error 1



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