Re: Crashing with widgets as class members
- From: Bob Caryl <bob fis-cal com>
- To: "John C. Spray" <spray lyx org>
- Cc: gtkmm-list gnome org
- Subject: Re: Crashing with widgets as class members
- Date: Fri, 10 Feb 2006 11:31:35 -0600
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.
Bob
John C. Spray wrote:
On Fri, 2006-02-10 at 09:20 -0600, Bob Caryl wrote:
If you include a widget in a class where that widget's instantiation
would occur before Gtk has been initialized, you will see this
behavior. You need to include your classes as pointers and not
instantiate them until you're actually ready for them to come into
existance.
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.
TBH it seems like it's going to be easier to just switch to
pointer-members than get to the bottom of this. End-of-the-week-itis.
John
_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org
http://mail.gnome.org/mailman/listinfo/gtkmm-list
begin:vcard
fn:Robert Caryl
n:Caryl;Robert
org:Fiscal Systems, Inc.
adr:;;102 Commerce Circle;Madison;AL;35758;USA
email;internet:bob fis-cal com
title:Senior Software Design Engineer
tel;work:356-772-8920 X108
x-mozilla-html:TRUE
url:http://www.fis-cal.com
version:2.1
end:vcard
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]