Widgets & Notebook, help!!



I have a skeleton class that will eventually contains all the elementes needed to display and retrieve information from the users.
The class compiles nicely, but when I add it to the Gtk::Notebook the program issues a segmentation fault:

Here is an snip of the program in question.

OS:       WinXP
compiler: MinGW-CPP 3.4.2

namespace jme{
class Contacts : virtual public Gtk::Window{
protected:
       Gtk::VBox* vbox1;
       Gdk::Color* colour;
   
public:
       Contacts();
       virtual ~Contacts();
}; //class
} //namespace

jme::Contacts::Contacts(){
   colour = new Gdk::Color();
   vbox1 = new Gtk::VBox();

   this->vbox1->set_homogeneous(true);
   colour->set_rgb(0,255,255);

   this->vbox1->modify_bg(Gtk::STATE_NORMAL, *colour);
   this->add(*vbox1);
   
}
jme::Contacts::~Contacts(){
   delete colour;
   delete vbox1;
}

-----------------------------
namespace jme{
class Jaime : public Gtk::Window
{
public:
    Jaime();
    virtual ~Jaime();

protected:
    ....
    //Child widgets:
    Gtk::Notebook* notebook;
    jme::Contacts* contacts;
    ...
private:
    ...
    //Constructors and Destructor go here
    ...        
        
};//class
} //namespace

jme::Jaime::Jaime(){
  ........
    contacts = new jme::Contacts();
    notebook = new Gtk::Notebook();
    notebook->append_page(*contacts, "Contacts");
  ........
}
jme::Jaime::~Jaime(){
  delete all pointers...
}

TIA

-- 
* 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...

* If that document has fine printing anywhere, just chuck it in the garbage
                      - Jorge Escalante
Ma'assalama! Adiós! bye!


__________________________________________________________________
Switch to Netscape Internet Service.
As low as $9.95 a month -- Sign up today at http://isp.netscape.com/register

Netscape. Just the Net You Need.

New! Netscape Toolbar for Internet Explorer
Search from anywhere on the Web and block those annoying pop-ups.
Download now at http://channels.netscape.com/ns/search/install.jsp



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