Hi wxPython developers,
I've noticed that if a aui pane caption contains an equal sign ("=")
LoadPaneInfo from agw.aui.framemanager will crash when you try to load a
stored perspective. Here's an easy way to replicate using the wxPython demos
1) Start wxPython demo
2) Start the Advanced Generic Widget -> AUI demo, it runs without any issues
3) Go to the Demo code tab and search for ("Tree Pane"), changed that to
("Tree = Pane")
4) Save and restart demo gives this crash
Traceback (most recent call last):
File "/home/danielf/.wxPyDemo/modified/AUI.py", line 3038, in OnButton1
self.win = MainAUI(self, self.log)
File "/home/danielf/.wxPyDemo/modified/AUI.py", line 3009, in MainAUI
frame = AuiFrame(parent, -1, "AUI Test Frame", size=(800, 600), log=log)
File "/home/danielf/.wxPyDemo/modified/AUI.py", line 908, in __init__
self.BuildPanes()
File "/home/danielf/.wxPyDemo/modified/AUI.py", line 1347, in BuildPanes
self._mgr.LoadPerspective(perspective_default)
File
"/usr/lib/python2.7/dist-packages/wx-3.0-gtk2/wx/lib/agw/aui/framemanager.py",
line 5481, in LoadPerspective
pane = self.LoadPaneInfo(pane_part, pane)
File
"/usr/lib/python2.7/dist-packages/wx-3.0-gtk2/wx/lib/agw/aui/framemanager.py",
line 5316, in LoadPaneInfo
val_name, value = items.split("=")
ValueError: too many values to unpack
I'm not sure if this is the intended behavior and equal-signs are simply
forbidden, AUI documentation is of course famously lacking. However, if you
do the same with the non-agw AUI demo (AUI_DockingWindowMgr), there is no
crash and you can both save and load a perspective with a pane called "Tree
= Pane". Similar problems also exists with other delimiters of the
perspective layout string (";" and "|").
I tested this with wxPython 3.0.1.1, but it also happened with wx 2.8
Regards
Daniel
--
You received this message because you are subscribed to the Google Groups "wxPython-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.