Hi
I’m trying to display a tree with a custom renderer using the classes DataViewCtrl and PyDataViewCustomRenderer.
I have three problems. All of them happen only when I use a custom renderer. Also this only happens on OSX 10.8 - on Windows 7 I have none of these problems. wxPython version is 3.0.0.0 osx-cocoa (classic) and I’ve attached the complete example code.
- Whenever I click on one node I get this error message:
Traceback (most recent call last):
File “treetest.py”, line 63, in IsContainer
if not item:
File “/usr/local/lib/wxPython-3.0.0.0/lib/python2.7/site-packages/wx-3.0-osx_cocoa/wx/dataview.py”, line 107, in nonzero
def nonzero(self): return self.IsOk()
File “/usr/local/lib/wxPython-3.0.0.0/lib/python2.7/site-packages/wx-3.0-osx_cocoa/wx/dataview.py”, line 105, in IsOk
return _dataview.DataViewItem_IsOk(*args, **kwargs)
wx._core.PyAssertionError: C++ assertion “Assert failure” failed at /BUILD/wxPython-src-3.0.0.0/src/osx/cocoa/dataview.mm(2656) in OSXOnCellChanged(): unknown value type wxCustomRendererObject
This only happens when I use a custom renderer and a tree structure. If I use just a plain list or a simple textrenderer it works fine.
-
While I expand a node in the tree, it displays the last child of that node everywhere on the tree. This is only visible for a short time (less than a second) but it is annoying.
-
After I’ve expanded a node, whenever I click on a different node I get the following error:
2014-04-04 15:47:35.700 Python[3195:f07] *** -[__NSArrayM objectAtIndex:]: index 3 beyond bounds for empty array
(full stacktrace attached)
Best Regards,
Jonas
treetest.py (2.98 KB)
3_stacktrace.txt.txt (3.15 KB)