[glade--]strange behavior with signals for buttons when menubar also present
- From: Mark Jones <mark jones106 verizon net>
- To: <glademm-list gnome org>
- Subject: [glade--]strange behavior with signals for buttons when menubar also present
- Date: Fri, 25 Oct 2002 23:25:17 -0500
I am seeing some very strange behavior tonight. I have some buttons along with a menubar. I assigned button press signal handlers to the buttons. I then ran glade--, and began compilation and got the following error:
my_program.cc: In function `int main (int, char **)':
my_program.cc:17: cannot allocate an object of type `mainWindow'
my_program.cc:17: since the following virtual functions are abstract:
mainWindow_glade.hh:34: void
mainWindow_glade::on_oneButton_clicked ()
mainWindow_glade.hh:35: void
mainWindow_glade::on_twoButton_clicked ()
So, looking at the mainWindow_glade.hh file:
class mainWindow_glade : public Gtk::Window
{
protected:
mainWindow_glade();
~mainWindow_glade();
private:
virtual void on_new1_activate() = 0;
virtual void on_open1_activate() = 0;
virtual void on_save1_activate() = 0;
virtual void on_save_as1_activate() = 0;
virtual void on_close1_activate() = 0;
virtual void on_quit1_activate() = 0;
virtual void on_preferences1_activate() = 0;
virtual void on_about1_activate() = 0;
virtual void on_oneButton_clicked() = 0;
virtual void on_twoButton_clicked() = 0;
};
Ok, so it declared them all (which is good), both menubar signals (added not by me, already there by default, which is nice), and those two signals for my buttons.
Now looking at mainWindow.hh:
class mainWindow : public mainWindow_glade
{
void on_new1_activate();
void on_open1_activate();
void on_save1_activate();
void on_save_as1_activate();
void on_close1_activate();
void on_quit1_activate();
void on_preferences1_activate();
void on_about1_activate();
};
So, it left the two button signal handlers out. I add them, and it makes it past that part of the compilation.
So I decided to create a much simpler fake project to investigate. I added a hbox to a frame, and then two buttons and a combo box. I ran glade--, compiled, no such errors. I checked the two .hh files, everything looked good.
So, then I deleted everything out of it, added a vbox, menubar to the vbox, and then hbox to the menu bar, and then two buttons to the hbox. Now I get new errors and just the opposite situation than the above:
class window1_glade : public Gtk::Window
{
protected:
window1_glade();
~window1_glade();
private:
virtual void on_new1_activate() = 0;
virtual void on_open1_activate() = 0;
virtual void on_save1_activate() = 0;
virtual void on_save_as1_activate() = 0;
virtual void on_quit1_activate() = 0;
virtual void on_cut1_activate() = 0;
virtual void on_copy1_activate() = 0;
virtual void on_paste1_activate() = 0;
virtual void on_delete1_activate() = 0;
virtual void on_about1_activate() = 0;
virtual void on_button1_clicked() = 0;
virtual void on_button2_clicked() = 0;
};
Everything looks good there, as before.
class window1 : public window1_glade
{
void on_button1_clicked();
void on_optionmenu1_changed();
void on_button2_clicked();
};
Now, we can see it left all of the menu signals (except this optionmenu1, I can't find that anywhere in my glade file so I don't know where that is coming from).
I am using the latest glade-- that I can get (grabbed it out of cvs a couple hours ago).
Anyone else seeing this at all? I am seeing another problem, but I'll address this in a separate message.
Mark
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]