Problems with AGW AuiManager

Hi,

I’ve detected 3 problems concerning the AuiManager provided by AGW library when several panels are merged into a single notebook. Reloading a saved layout do not show the notebook with the expected state :

  • If the notebook contains three tabs and the first or last tab is selected before exiting, the notebook displays the second tab when the application is restarted
  • If some tabs have been dragged and dropped before exiting, the notebook doesn’t show the tabs in the proper order
  • When panels are merged, the panel containing the resulting notebook shows some buttons (close, maximize …) that are not shown after restarting the application
    Are these problems have already been identified in AGW 0.9.1 ?

Cheers,

Thierry BRIZZI.

Moreover, when a tab has been dragged and dropped, it is impossible to select some tabs …

···

Le jeudi 7 novembre 2013 12:36:08 UTC+1, Thierry Brizzi a écrit :

Hi,

I’ve detected 3 problems concerning the AuiManager provided by AGW library when several panels are merged into a single notebook. Reloading a saved layout do not show the notebook with the expected state :

  • If the notebook contains three tabs and the first or last tab is selected before exiting, the notebook displays the second tab when the application is restarted
  • If some tabs have been dragged and dropped before exiting, the notebook doesn’t show the tabs in the proper order
  • When panels are merged, the panel containing the resulting notebook shows some buttons (close, maximize …) that are not shown after restarting the application
    Are these problems have already been identified in AGW 0.9.1 ?

Cheers,

Thierry BRIZZI.

@ Thin zzi
The notebook showing proper order issue can be fixed(worked around with a startup def/pickle). Start by iterating over the NBpages before Close()/Destroy(), then restore from saved object/list/dict/whatever.

-Major Issues- Splitting/Merging NB Tabs; Saving/Restoring Notebook Perspectives; NBTab Focus when doing said stuff.
-Major Issue- “Moreover, when a tab has been dragged and dropped, it is impossible to select some tabs …” -Thierry Brizzi; “Focus on the Focusing”-Metalio Bovinus

-Minor Issues- Drag n’ Drop NB Tab Images showing correctly; smooth sliding of notebook tabs when moving(like Chrome/QT has); Some of the style bits are still WIPz/Unfinished.

@ Robin / wxDEVs
Moreover… Yes there are problems. And I would like also to 2nd the vote for fixing these issues(I know some are tricky…) or at least sideways8 the issues so that they are not forgotten(please stick them in a TODO List somewhere in Andrea’s, Robin’s, or other wx.Dev’s HDD to be done sometime. :slight_smile: .
Overall, I have observed these “glitches in the code”. Yes, They are real. ATM saving and restoring AuiNotebookPerspectives is totally foobar’d.
The whole AUINotebook NEEDS a dev/fixit walkthough per say. This probably goes also for some things in agw/AUI general and FlatMenu.
Some of the smaller things, I have fixed, hopefully when I get some time I will backport those fixes and tweaks.

Until then, we are let with… (The Bleeding Edge(DEV/SVN/Versions))

···

On Thursday, November 7, 2013 8:25:19 AM UTC-6, Thierry Brizzi wrote:

Moreover, when a tab has been dragged and dropped, it is impossible to select some tabs …

Le jeudi 7 novembre 2013 12:36:08 UTC+1, Thierry Brizzi a écrit :

Hi,

I’ve detected 3 problems concerning the AuiManager provided by AGW library when several panels are merged into a single notebook. Reloading a saved layout do not show the notebook with the expected state :

  • If the notebook contains three tabs and the first or last tab is selected before exiting, the notebook displays the second tab when the application is restarted
  • If some tabs have been dragged and dropped before exiting, the notebook doesn’t show the tabs in the proper order
  • When panels are merged, the panel containing the resulting notebook shows some buttons (close, maximize …) that are not shown after restarting the application
    Are these problems have already been identified in AGW 0.9.1 ?

Cheers,

Thierry BRIZZI.

Hi,

Can you send me some snippets allowing me to overload the base AuiNotebook class behavior in order to not wait for a stable release of AGW ?

Thanks !

···

Le mardi 12 novembre 2013 12:13:56 UTC+1, Metallicow a écrit :

On Thursday, November 7, 2013 8:25:19 AM UTC-6, Thierry Brizzi wrote:

Moreover, when a tab has been dragged and dropped, it is impossible to select some tabs …

Le jeudi 7 novembre 2013 12:36:08 UTC+1, Thierry Brizzi a écrit :

Hi,

I’ve detected 3 problems concerning the AuiManager provided by AGW library when several panels are merged into a single notebook. Reloading a saved layout do not show the notebook with the expected state :

  • If the notebook contains three tabs and the first or last tab is selected before exiting, the notebook displays the second tab when the application is restarted
  • If some tabs have been dragged and dropped before exiting, the notebook doesn’t show the tabs in the proper order
  • When panels are merged, the panel containing the resulting notebook shows some buttons (close, maximize …) that are not shown after restarting the application
    Are these problems have already been identified in AGW 0.9.1 ?

Cheers,

Thierry BRIZZI.

@ Thin zzi
The notebook showing proper order issue can be fixed(worked around with a startup def/pickle). Start by iterating over the NBpages before Close()/Destroy(), then restore from saved object/list/dict/whatever.

-Major Issues- Splitting/Merging NB Tabs; Saving/Restoring Notebook Perspectives; NBTab Focus when doing said stuff.
-Major Issue- “Moreover, when a tab has been dragged and dropped, it is impossible to select some tabs …” -Thierry Brizzi; “Focus on the Focusing”-Metalio Bovinus

-Minor Issues- Drag n’ Drop NB Tab Images showing correctly; smooth sliding of notebook tabs when moving(like Chrome/QT has); Some of the style bits are still WIPz/Unfinished.

@ Robin / wxDEVs
Moreover… Yes there are problems. And I would like also to 2nd the vote for fixing these issues(I know some are tricky…) or at least sideways8 the issues so that they are not forgotten(please stick them in a TODO List somewhere in Andrea’s, Robin’s, or other wx.Dev’s HDD to be done sometime. :slight_smile: .
Overall, I have observed these “glitches in the code”. Yes, They are real. ATM saving and restoring AuiNotebookPerspectives is totally foobar’d.
The whole AUINotebook NEEDS a dev/fixit walkthough per say. This probably goes also for some things in agw/AUI general and FlatMenu.
Some of the smaller things, I have fixed, hopefully when I get some time I will backport those fixes and tweaks.

Until then, we are let with… (The Bleeding Edge(DEV/SVN/Versions))

Umm, Exactly, what type of overloads are you looking for? There are a lot of ifffy workarounds…
Most of what I have done is for SourceCoder, which is altered library stuff, mostly specific to my project.
As far as restoring notebook perspectives, I have defs that handle that in my code that you might want to consider. Note: AuiNotebook Perspectives are still not restored upon app startup. Everything is Unsplit before and after. So, that means having all tabs in line, or not showing at all if tab height is setup(Note: it it a code editor and paned IDE for the most part)

So, give me a general idea of what type of functionality you are looking for and I will consider cropping a few parts out that may be of use for you.

···

On Wednesday, November 13, 2013 3:58:10 AM UTC-6, Thierry Brizzi wrote:

Can you send me some snippets allowing me to overload the base AuiNotebook class behavior in order to not wait for a stable release of AGW ?

Hi,

I’ve attached to this email the example I’ve made to demonstrate GDI resource leaks in the following thread : AGW AuiNotebook and memory management. The frame display a AuiNotebook having a single page with a layout containing panels merged in a single AuiNotebook. Each time the tab is closed, the perspective relative to the layout is saved and another page is opened and displays the last saved layout. This example is useful to reproduce all the problems I’ve found concerning AGW’s AuiManager and AuiNotebook classes.

It would be great if you could customize this example to show me how you have overcame some bugs like the preservation of the order of AuiNotebook pages.

Regards.

nb_widget.py (6.11 KB)

···

Le mardi 19 novembre 2013 00:57:13 UTC+1, Metallicow a écrit :

On Wednesday, November 13, 2013 3:58:10 AM UTC-6, Thierry Brizzi wrote:

Can you send me some snippets allowing me to overload the base AuiNotebook class behavior in order to not wait for a stable release of AGW ?

Umm, Exactly, what type of overloads are you looking for? There are a lot of ifffy workarounds…
Most of what I have done is for SourceCoder, which is altered library stuff, mostly specific to my project.
As far as restoring notebook perspectives, I have defs that handle that in my code that you might want to consider. Note: AuiNotebook Perspectives are still not restored upon app startup. Everything is Unsplit before and after. So, that means having all tabs in line, or not showing at all if tab height is setup(Note: it it a code editor and paned IDE for the most part)

So, give me a general idea of what type of functionality you are looking for and I will consider cropping a few parts out that may be of use for you.

Working with the example…
Ok, it seems in your example what you have is a frame perspective, not a saved notebook perspective…?

What are you trying to do… Restore a AuiFrame or AuiNotebook perspective? Both are different approaches/methods to restoring similar outputs(Ex: frame.SavePerspective() or auiNB.SavePerspective()).
Which is it you are trying to achieve?

···

On Tuesday, November 19, 2013 3:19:41 AM UTC-6, Thierry Brizzi wrote:

Hi,

I’ve attached to this email the example I’ve made to demonstrate GDI resource leaks in the following thread : AGW AuiNotebook and memory management. The frame display a AuiNotebook having a single page with a layout containing panels merged in a single AuiNotebook. Each time the tab is closed, the perspective relative to the layout is saved and another page is opened and displays the last saved layout. This example is useful to reproduce all the problems I’ve found concerning AGW’s AuiManager and AuiNotebook classes.

It would be great if you could customize this example to show me how you have overcame some bugs like the preservation of the order of AuiNotebook pages

Ok, managed to get a simple hacked example working and loading frame and auiNB perspectives.
Uses pickle.
See working attachment, and note comments related to certain loading actions.
File genereates pickle on close and loads it on startup.

This should get you started. hopefully…

nb_t_izzy_widget.py (14.9 KB)

It seems that the problem with merging and displaying the AuiNB Perspective Correctly has something to do with the bottom most merge position.

@ Note:
When the user splits the AuiNB and it has 3 or more rows, then if it is merged on the bottommost portion/highlight, then glitches start to occur, and this also saves in the AuiNB perspective. This glitchyness doesn’t occur if the split is dragged to the topmost highlight tho…

top of auiNB highlight

-----|
>
-----|
>
-----|
>
-----|
>
-----|
bottom of auiNB highlight

Hi,

Sorry for my late post. I was on vacations. Thank you very much for your advices. I’ll test the updated program next days.

Cheers,

Thierry.

···

Le mercredi 20 novembre 2013 22:29:27 UTC+1, Metallicow a écrit :

It seems that the problem with merging and displaying the AuiNB Perspective Correctly has something to do with the bottom most merge position.

@ Note:
When the user splits the AuiNB and it has 3 or more rows, then if it is merged on the bottommost portion/highlight, then glitches start to occur, and this also saves in the AuiNB perspective. This glitchyness doesn’t occur if the split is dragged to the topmost highlight tho…

top of auiNB highlight

-----|
>
-----|
>
-----|
>
-----|
>
-----|
bottom of auiNB highlight