aui LoadPerspective with a new window

Riccardo Cohen rcohen at articque.com
Mon Feb 11 06:15:18 PST 2008


Hi
I have 2 panes. and I save the perspective.
Then I restart my program but for some reason there is an additionnal 
pane in aui manager.(lets say on monday I need 3 panes)

If I call LoadPerspective(), the 3rd pane disappear, since it is not in 
the saved configuration.
I tried to call Show() again, change the size etc. Impossible to see the 
new window
I tried to add the pane once more, and it gave me an assertion failure 
(A pane with that name already exists in the manager!) but finally 
showed the 3rd window:

   // add the window
   m_auiManager.AddPane(thirdwindow,paneinfo);

   // load perspective that does not have the third window in it
   m_auiManager.LoadPerspective(str);

   // test if the window appear
   wxSize size=thirdwindow->GetSize();
   if (size.GetWidth()==0 || size.GetHeight()==0)
     m_auiManager.AddPane(thirdwindow,paneinfo); // THIS GIVES AN 
ASSERTION FAILURE BUT SHOWS THE WINDOW


What is the best practice for this case ?

Thanks

-- 
Très cordialement,

Riccardo Cohen
-------------------------------------------
Articque
http://www.articque.com
149 av Général de Gaulle
37230 Fondettes - France
tel : 02-47-49-90-49
fax : 02-47-49-91-49




More information about the wx-users mailing list