Re: Removing a widget from its container without destroying it



When it crash, it wrote:   Gtk-CRITICAL **: gtk_widget_real_realize: assertion 'GTK_WIDGET_NO_WINDOW <widget>' failed
 
some part of my code:
 
class CMyApp
{
  public:
    CMyApp();
    void next();
    void previous();
 
  protected:
    std::list<MyWidget*> m_MyWidget;
    std::list<MyWidget*>::iterator m_Iter;
    Gtk::VBox m_VBox;
};
 
CMyApp::CMyApp()
{
    //some m_MyWidget.push_back(...)
    m_Iter = m_MyWidget.begin();
   m_VBox.add(*(*(m_Iter)));
   add(m_VBox);
 
}
 
CMyApp::previous()
{
    m_VBox.remove(*(*m_Iter));
   m_Iter--;
   m_VBox.add(*(*m_Iter));
}
CMyApp::next()
{
    m_VBox.remove(*(*m_Iter));
   m_Iter++
   m_VBox.add(*(*m_Iter));
}

 
 
 
2006/2/13, Murray Cumming <murrayc murrayc com>:
On Mon, 2006-02-13 at 09:16 +0100, Mickael Drean wrote:
> It seems I have the gtkmm-devel-2.6.2-1.exe package for windows and in
> the repertories I have gtkmm-2.4!! How can I know which one i got?

I'm not sure what you mean by "repertories". but gtkmm 2.6 is version
2.6 of the gtkmm 2.4 API. There is no contradiction.

> If i got the good one, I don't understand why my soft crash when i try
> to use again the widget i remove before!!!

Try a small test case to show the problem.


--
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]