Gtk--: menu_factory to item_factory, part 2



First of all, thanks to the people who've had the patience
to put up with me and answer my questions ...

So far I've used menu_factory and I'm in the process of switching
to item_factory. With menu_factory, I've always used the following
type callbacks:

// C-Style callback function for the menu-factory callbacks
void c_file_menu_callback (GtkWidget *widget, gpointer data)
{
     if (widget && data);                // silence compiler warning
     cs_guihfe->fileMenuCallback (widget, data);
}

I've got a basic version of item_factory (almost) working, but for
the life of me can't figure out how to use item_factory so that I
can just take over the above callback code. Due to some old code
baggage that I'm still carrying around with me, I'd like to keep
the C-style callbacks ...


Also, since switching to the item_factory code, my program compiles
OK, but fails to link with a bunch of the following errors:

Here's the type of code I have:
d_menuFactory->create_item ("/File", 0, "<Branch>", 0);
d_menuFactory->create_item ("/File/New", 0, 0,
     ItemFactoryConnector<TFWindow, string>(this,&testcb,"dork"));

Here's (a few of) the link errors:
TFWindow.o: In function `ItemFactoryConnector<TFWindow, basic_string<char,
string_char_traits<char>, __default_alloc_template<true, 0> >
>::connectTo(Gtk_Widget *) const':
TFWindow.o(.ItemFactoryConnector<TFWindow, basic_string<char,
string_char_traits<char>, __default_alloc_template<1, 0> >
>::gnu.linkonce.t.connectTo(Gtk_Widget *) const+0x23e): undefined reference
 to `Gtk_Object::signal_connect(char const *, void (*)(...), void *)'

Obviously I'm doing something wrong, but just don't know what ...

Any insights (into either of my problems) would be much appreciated ...

-> Robert





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