GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Fri Aug 26, 2016 3:12 am

All times are UTC

Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Gtk::HBox in a Gtk::VBox, Help!!
PostPosted: Tue Nov 08, 2005 3:39 am 
Familiar Face

Joined: Thu Sep 22, 2005 12:23 pm
Posts: 20
I am trying to write a class that derives from Gtk::VBox called Contacts, the idea is to pack every widget necessary to display and retrieve data from the user. This class will be passed to a Gtk::Notebook::append_page as te widget to be displayed.
The class compiles just fine, but at the point where I add the Gtk::HBox object to the Gtk::VBox derived class the program craches/segmentation fault.

Could someone please tell me what I am doing wrong?

Here is the example:

class Contacts : virtual public Gtk::VBox{
Gtk::HBox hbox1;
Gtk::HBox hbox2;

virtual ~Contacts();
}; //class
this->pack_start(hbox1); //Segmentation Fault


* You cannot exercise your power to a point of humiliation.
- Jean Chretien

* It's amazing how the small seeds of distrust and misunderstanding
can yield a crop of hate and death...

Ma'assalama! Adiós! bye!

 Post subject:
PostPosted: Wed Nov 09, 2005 8:57 pm 
Never Seen the Sunlight

Joined: Wed Sep 21, 2005 3:07 am
Posts: 384
Location: Fairfax, Virginia
The first function called is your constructor Contacts(), but at no point before you do this->pack_start(hbox1); do you initialize the Gtk::HBox...

Andrew Krause

Foundations of GTK+ Development: Buy now for only $31.49!

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC

Who is online

Users browsing this forum: No registered users and 3 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group