Problem with sigc::bind



the following is my program structure...
I want to transfer the father window to the signal handler

ComInfo::ComInfo(Gtk::Window& window)
{
    ....
 // bind Gtk::Window& window
m_TreeView.signal_row_activated().connect(sigc::bind<Gtk::Window&>(sigc::mem_fun(*this,
&ComInfo::on_company_activated),window));
    ......
}

//This is the response function
ComInfo::on_company_activated(const Gtk::TreeModel::Path& path,
Gtk::TreeViewColumn*, Gtk::Window& window)
{
  Gtk::MessageDialog dialog(window,"This is an INFO MessageDialog");
  dialog.set_secondary_text("And this is the secondary text that
explains things.");

  dialog.run();

}

In another source file :
ComInfo m_ComInfo;

ComShow::ComShow()
:m_ComInfo(*this)
{
....
}

but this met many problems it says,
In instantiation of `sigc::bound_argument<Gtk::Window&>':
1263 E:\Server\GTK\include\sigc++-2.0\sigc++\adaptors\bind.h
instantiated from `sigc::bind_functor<-0x000000001,
sigc::bound_mem_functor3<void, ComInfo, const Gtk::TreePath&,
Gtk::TreeViewColumn*, Gtk::Window&>, Gtk::Window&, sigc::nil,
sigc::nil, sigc::nil, sigc::nil, sigc::nil, sigc::nil>'

158 E:\Server\GTK\include\sigc++-2.0\sigc++\adaptors\bound_argument.h
'const class sigc::bound_argument<Gtk::Window&>' has no member named
'visit'

 E:\Server\GTK\include\sigc++-2.0\sigc++\adaptors\bound_argument.h In
function `void sigc::visit_each(const T_action&, const
sigc::bound_argument<T_type>&) [with T_action =
sigc::internal::limit_derived_target<sigc::trackable*,
sigc::internal::slot_do_unbind>, T_type = Gtk::Window&]':

158 E:\Server\GTK\include\sigc++-2.0\sigc++\adaptors\bound_argument.h
'const class sigc::bound_argument<Gtk::Window&>' has no member named
'visit'

any one can give me some advice, thanks a lot!



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