Kirix Support Forums

SavePerspective and LoadPerspective

Please post all general questions, comments, bug reports, and any other wxAUI feedback here.

SavePerspective and LoadPerspective

Postby Joel on Thu Jan 19, 2006 7:29 am

What I save a perspective to the registry, and I load it again, the entire UI is all over the shot:

Before: Image
After: Image

Not only is the notebook missing, I cannot drag the currently docked toolbar.
Joel's Place
Project Administrator for the UPX GUI and developer for wxDev-C++

I want a legal copy of VS Professional! :P
Joel
Registered User
 
Posts: 37
Joined: Mon Jan 09, 2006 1:32 pm
Location: Singapore

Postby Ben on Thu Jan 19, 2006 8:02 am

Did you try to just save it into a string first and then reload it? e.g.:

Code: Select all
wxString s = m_mgr.SavePerspective();
m_mgr.LoadPerspective(s);


What I'm getting at is this: Does saving it in the registry make it not work, or just the perspective loading and saving?
User avatar
Ben
Kirix Support Team
 
Posts: 525
Joined: Mon Dec 19, 2005 6:29 am

Postby Joel on Thu Jan 19, 2006 9:05 am

doing what you said works - I have a feeling its because of some wild pointer or something - i dunno
Joel's Place
Project Administrator for the UPX GUI and developer for wxDev-C++

I want a legal copy of VS Professional! :P
Joel
Registered User
 
Posts: 37
Joined: Mon Jan 09, 2006 1:32 pm
Location: Singapore

Postby Ben on Thu Jan 19, 2006 10:59 am

It may be that you forgot to give all of your panes names. If you don't specify a pane name, wxAUI will generate a random one for you.

If you close the program and open it again, of course the random pane names will be different.

Try using Name() to specify a pane name that doesn't change.

e.g

Code: Select all
m_mgr.AddPane(wnd, wxPaneInfo().
                  Name(wxT("put_name_here")).Caption(wxT("Pane Caption")));
User avatar
Ben
Kirix Support Team
 
Posts: 525
Joined: Mon Dec 19, 2005 6:29 am

Postby Ben on Thu Jan 19, 2006 1:19 pm

Sure :-) No Problem.
User avatar
Ben
Kirix Support Team
 
Posts: 525
Joined: Mon Dec 19, 2005 6:29 am

Postby Joel on Thu Jan 19, 2006 2:15 pm

Ah, thanks, maybe you should mention this in the docs? coz in wx its not routine that users have to assign names to controls.
Joel's Place
Project Administrator for the UPX GUI and developer for wxDev-C++

I want a legal copy of VS Professional! :P
Joel
Registered User
 
Posts: 37
Joined: Mon Jan 09, 2006 1:32 pm
Location: Singapore

Return to wxAUI Questions, Thoughts & Feedback