[wxPython-users] GetDefaultEditorForType(): Unknown data type name []

Petr Hlávka petrhlavka at gmail.com
Wed Aug 1 06:31:24 PDT 2007


On 8/1/07, Petr Hlávka <petrhlavka at gmail.com> wrote:
> On 7/31/07, Robin Dunn <robin at alldunn.com> wrote:
> > Petr Hlávka wrote:
> > > Hello,
> > >
> > > after migration from wxPython 2.6.3.2 to 2.8.4.0 (and Python 2.3 to
> > > 2.5) I encounter strange errors when operating with grid in my app. I
> > > have own GridBaseTable and some registered custom grid types (for bool
> > > values). Sometimes (usually only for random cells) I've got an
> > > exception:
> > >
> > > attr = wx.grid.GridCellAttr()
> > > File "C:\Python25\Lib\site-packages\wx-2.8-msw-unicode\wx\grid.py", line 513,
> > > in __init__
> > > _grid.GridCellAttr_swiginit(self,_grid.new_GridCellAttr(*args, **kwargs))
> > > wx._core.PyAssertionError: C++ assertion "wxAssertFailure" failed at ..\..\src\g
> > > eneric\grid.cpp(10223) in wxGrid::GetDefaultEditorForType(): Unknown data type n
> > > ame []
> > >
> > > The GetTypeName method always returns non-empty value so this error is
> > > quite strange for me. I'm not able to send the whole code here and
> > > when I try to cut off some snips, everything works correctly...
> > >
> > > Have anyone similar problems or could someone point me to the root of
> > > the problem.
> >
> > I'll really need a runnable sample for this to be able to track it down.
> >   The wxGrid code is just too big to keep it in my head, I need to look
> > at a backtrace in the debugger.
> >
>
> I managed to create a simple app which demonstrates the problem (on
> WinXP). When I click any of the unchecked checkbox I've got error
> message described earlier (it's generated during the GridCellAttr()
> call. Could someone please take a look on the code.
>

It seems to be my fault, when I add CanGetValueAs/CanSetValueAs
methods to GridTableBase everything is OK...

  Petr.




More information about the wxpython-users mailing list