HyperTreeList control on Mac OSX

Hi

I haven’t got much experience using a Mac but have just compiled and installed wxPython3.0.1 on a Mac that runs Mavericks.

When creating a HyperTreeList with icons for various rows I get a crash that I don’t see on neither Linux nor Windows platforms. The test code below runs fine on Windows or Linux:

import wx
import wx.lib.agw.hypertreelist as HTL
app =wx.App()
htc = HTL.HyperTreeList(wx.Frame(None))
htc.SetImageList(wx.ImageList(32, 32))

but on the Mac it crashes with:

File “…/Python.framework/Versions/2.7/lib/python2.7/site-packages/wx-3.0-osx_cocoa/wx/_gdi.py”, line 6801, in GetSize
return gdi.ImageList_GetSize(*args, **kwargs)

wx._core.PyAssertionError: C++ assertion “node” failed at …/wxPython-src-3.0.1.0/src/osx/imaglist.cpp(266) in GetSize(): wrong index in image list

Would anybody know of a fix or a workaround?

Many thanks,

Rob

Seems likely that it is because you haven’t added anything to the imageList when you pass it to SetImageList. Create the list, then add icons, then SetImageList it. Then let us know if that worked or not :slight_smile:

···

On Thursday, February 5, 2015 at 10:39:17 AM UTC-8, Robert Oeffner wrote:

Hi

I haven’t got much experience using a Mac but have just compiled and installed wxPython3.0.1 on a Mac that runs Mavericks.

When creating a HyperTreeList with icons for various rows I get a crash that I don’t see on neither Linux nor Windows platforms. The test code below runs fine on Windows or Linux:

import wx
import wx.lib.agw.hypertreelist as HTL
app =wx.App()
htc = HTL.HyperTreeList(wx.Frame(None))
htc.SetImageList(wx.ImageList(32, 32))

That works fine now.

Thanks a lot,

Rob

···

On Thursday, 5 February 2015 23:00:55 UTC, Nathan McCorkle wrote:

On Thursday, February 5, 2015 at 10:39:17 AM UTC-8, Robert Oeffner wrote:

Hi

I haven’t got much experience using a Mac but have just compiled and installed wxPython3.0.1 on a Mac that runs Mavericks.

When creating a HyperTreeList with icons for various rows I get a crash that I don’t see on neither Linux nor Windows platforms. The test code below runs fine on Windows or Linux:

import wx
import wx.lib.agw.hypertreelist as HTL
app =wx.App()
htc = HTL.HyperTreeList(wx.Frame(None))
htc.SetImageList(wx.ImageList(32, 32))

Seems likely that it is because you haven’t added anything to the imageList when you pass it to SetImageList. Create the list, then add icons, then SetImageList it. Then let us know if that worked or not :slight_smile: