exceptions with custom GridCellEditor in phoenix (works with Classic)

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

exceptions with custom GridCellEditor in phoenix (works with Classic)

Marco Prosperi

hello, in my application I have a grid in agw.aui page. If the user closes the page while a grid cell editor is active then I get an exception. I've overcome this putting self.DisableCellEditControl() in Destroy method of the grid. This solution doesn't work for cells with custom editor. In this case closing the page I get the following exception

wx._core.wxAssertionError: C++ assertion "GetEventHandler() == this" failed at ..\..\src\common\wincmn.cpp(478) in wxWindowBase::~wxWindowBase(): any pushed event handlers must have been removed

During handling of the above exception, another exception occurred:

SystemError: <class 'wx._core.ChildFocusEvent'> returned a result with an error set

My custom cell editor resembles the demo custom grid editors. In particular if I comment out in Create these 2 lines

def Create(..
        if evtHandler:

the exception doesn't happen anymore. Is this a bug in wxpython or something to be managed differently in phoenix? (I hadn't this problem with Classic)

I use wxpython 4.0.4a1, Python 3.5, win 10.


You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.