GTK+ Forums Forum Index GTK+ Forums
Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Gtk::HBox in a Gtk::VBox, Help!!

 
Post new topic   Reply to topic    GTK+ Forums Forum Index -> GTK+ Programming
Author Message
Jamiil
Familiar Face


Joined: 22 Sep 2005
Posts: 20

PostPosted: Tue Nov 08, 2005 3:39 am    Post subject: Gtk::HBox in a Gtk::VBox, Help!! Reply with quote

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:
==========
WinXP
MinGW-GCC

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

public:
Contacts();
virtual ~Contacts();
}; //class
jme::Contacts::Contacts(){
this->pack_start(hbox1); //Segmentation Fault
}
==============

TIA
Back to top
openldev
Never Seen the Sunlight


Joined: 21 Sep 2005
Posts: 387
Location: Fairfax, Virginia

PostPosted: Wed Nov 09, 2005 8:57 pm    Post subject: Reply with quote

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...
Back to top
Display posts from previous:   
Post new topic   Reply to topic    GTK+ Forums Forum Index -> GTK+ Programming All times are GMT
Page 1 of 1

 


Powered by phpBB © 2001, 2005 phpBB Group
CodeBB 1.0 Beta 2
Protected by Anti-Spam ACP