problem with Glib:OptionContext



Hello, I'm trying to retrieve command line parameters using:  Main
<http://www.gtkmm.org/docs/gtkmm-2.4/docs/reference/html/classGtk_1_1Main.html#a2>
(int& argc, char**& argv, Glib::OptionContext
<http://www.gtkmm.org/docs/glibmm-2.4/docs/reference/html/classGlib_1_1OptionContext.html>&
option_context) contructor.

Glib::OptionContext context;
Gtk::Main m (&argc, &argv,&context);

But i get a message saying that OptionContext is not a member of Glib.
(ooops)
I'm using glibmm 2.4.7 and gtkmm 2.4.1.

By the way, what is the best (cleanest) way to get command line
parameters in the main window Object?  I'm using get_widget_derived, so
I can't override the Window's constructor to pass OptionContext.  I
actually use a  myWin->setOptionContext(...) method to do the job before
calling Gtk::Main::run but I 'd like to know if there is a better solution.

Thanks for help.

DAve.





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