LoadPerspective events

Is there any build in way to respond to loading of windows when
calling AUIs LoadPerspective.

The usecase I have is when I'm setting perspectives for windows that
have not been created yet since Id like to avoid creating all windows
ever in advance.

The messy way to do this is to parse the perspective string and check
for all names and to see if I have a pane for them and create them if
appropriate.

Is this handled in some way by ie. events or callbacks?

(events would not do I guess since the loading will not wait for any
sort of response before moving on.

If you're using AGW aui then you can probably override the method that is used to find the panes and do it from there. Trace through LoadPerspecitve to see where you can hook in to the process.

···

On 11/13/10 7:37 PM, Freyr Magn�sson wrote:

Is there any build in way to respond to loading of windows when
calling AUIs LoadPerspective.

The usecase I have is when I'm setting perspectives for windows that
have not been created yet since Id like to avoid creating all windows
ever in advance.

The messy way to do this is to parse the perspective string and check
for all names and to see if I have a pane for them and create them if
appropriate.

Is this handled in some way by ie. events or callbacks?

(events would not do I guess since the loading will not wait for any
sort of response before moving on.

--
Robin Dunn
Software Craftsman

Yes, this would work.

In hindsight I actually see that I don't really want to hook into the
AUI internals but rather implement my own application specific way of
persistng restoring the tool with state and content and leave the
perspective for what it is, namely layout.

···

On Nov 14, 6:44 am, Robin Dunn <ro...@alldunn.com> wrote:

On 11/13/10 7:37 PM, Freyr Magn sson wrote:

> Is there any build in way to respond to loading of windows when
> calling AUIs LoadPerspective.

> The usecase I have is when I'm setting perspectives for windows that
> have not been created yet since Id like to avoid creating all windows
> ever in advance.

> The messy way to do this is to parse the perspective string and check
> for all names and to see if I have a pane for them and create them if
> appropriate.

> Is this handled in some way by ie. events or callbacks?

> (events would not do I guess since the loading will not wait for any
> sort of response before moving on.

If you're using AGW aui then you can probably override the method that
is used to find the panes and do it from there. Trace through
LoadPerspecitve to see where you can hook in to the process.

--
Robin Dunn
Software Craftsmanhttp://wxPython.org

Maybe you'll find the PersistentControls module helpful then. See
thread below:

http://groups.google.com/group/wxpython-users/browse_thread/thread/e324699bea201f31/4243902483146779?lnk=raot

···

On Nov 15, 6:41 pm, Freyr Magnússon <freyr.magnus...@gmail.com> wrote:

Yes, this would work.

In hindsight I actually see that I don't really want to hook into the
AUI internals but rather implement my own application specific way of
persistng restoring the tool with state and content and leave the
perspective for what it is, namely layout.

-------------------
Mike Driscoll

Blog: http://blog.pythonlibrary.org