[gtkmm] Dialog Problem
- From: Gene Ruebsamen <gene erachampion com>
- To: gtkmm-list gnome org
- Subject: [gtkmm] Dialog Problem
- Date: Mon, 10 Mar 2003 16:00:22 -0800
Hello,
I am having a problem with a class I've derived from Gtk::Dialog.
The problem is that I cannot call the run() method on any objects derived from
Gtk::Dialog. I get the following compiler error trying to do so:
---- output from mingw ---- [gcc 3.2]
d:/dev-cpp/include/gtkmm-2.0/gtkmm/dialog.h: In member function `virtual void
DropMenu::on_help_about(MainWindow*)':
d:/dev-cpp/include/gtkmm-2.0/gtkmm/dialog.h:196: `int Gtk::Dialog::run()' is
inaccessible
mainwindow.cpp:52: within this context
---------------------------
my class is setup as follows:
// ----------- optionDialog class -----------
class optionDialog : public Gtk::Dialog
{
public:
OptionDialog::OptionDialog(const Glib::ustring &, Gtk::Window &);
virtual OptionDialog::~OptionDialog();
protected:
... // misc signal handlers & widgets
Gtk::Button *m_Button_Ok, *m_Button_Cancel;
}
optionDialog::optionDialog(const Glib::ustring &title, Gtk::Window &parent) :
Gtk::Dialog(title,parent)
{
m_Button_Cancel = add_button(Gtk::Stock::CANCEL,Gtk::RESPONSE_CANCEL);
m_Button_Ok = add_button(Gtk::Stock::OK,Gtk::RESPONSE_OK);
}
// --------------- main app window ----------------
class MainWindow : public Gtk::Window
{
public:
MainWindow();
virtual MainWindow::~MainWindow();
protected:
... // misc signal handlers & widgets
virtual void on_option_dialog();
optionDialog *m_optionDialog;
}
MainWindow::MainWindow()
{
m_optionDialog = new optionDialog("Program Settings", *this);
}
MainWindow::~MainWindow()
{
delete m_optionDialog;
}
void MainWindow::on_option_dialog()
{
m_optionDialog->run(); // THIS IS WHERE I GET THE COMPILER ERROR!!
}
------------------------
I am using the latest Win32 gtkmm-2.2 and gtk-2.2. I am a newbie when it comes
to Gtk and Gtkmm; however, all the examples I tried in the Gtkmm book compiled
fine. Strangely, if I instantiate a class of Gtk::MessageDialog, I am able to
call the run() method on those objects. Is there something funny about the
Gtk::Dialog that I'm not seeing????
Thanks in Advance!
--
Gene Ruebsamen
-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]