Re: Crashing with widgets as class members



On Fri, 2006-02-10 at 11:31 -0600, Bob Caryl wrote:
> My class containing widgets is created with "new" long after the start
> of the program, after other classes using gtkmm have functioned
> correctly (and Gtk::Main) has been called.
> 
> Am I doing something illegal when I do:
> 
> class MyClass {
>     public:
>     Gtk::ComboBoxText mycombo_;
> }
> 
> Hey John,
> 
> As you can see above, you are NOT creating Gtk::ComboBoxText as a 
> pointer.  You are instantiating it in your MyClass definition.  This 
> means that instantiation is going to happen before you initialize the 
> toolkit.

Only if MyClass is instantiated that early.

-- 
Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com




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