Discussion:
custom gridcellchoiceeditor problems
Marco Prosperi
2014-10-22 22:27:55 UTC
Permalink
hello, I'm trying to use the CustomCellChoiceEditor implemented as in the
attached example. The reason why I want a custom one is that in the
database table behind the grid I accept values like 0,1,2 while to the user
I want to show ['0 open','1 suspended','2 closed'] (I also use a custom
renderer, not shown here). I have two problems:
- in my original application when the user enables a cell editor, scroll
the horizontal bar until that cell is hidden and click on another visibile
cell the application crashes (not the attached script but maybe you can see
if I make something that causes a memory corruption)
- I would like to prevent the user from leaving a cell editor active (for
example: if you enable a cell editor with a double click and scroll with
horizontal bar the editor remains active). I've tried to use
EVT_LEAVE_WINDOW but it doesn't work in my implementation because when the
dropdown list of the choice control should be displayed the editor is
closed. How can I get the desired behaviour?

thank you in advance,
Marco
--
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 wxpython-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Marco Prosperi
2014-10-23 07:09:04 UTC
Permalink
I use python2.7 with wxpython 2.9 on win7-64bit
Post by Marco Prosperi
hello, I'm trying to use the CustomCellChoiceEditor implemented as in the
attached example. The reason why I want a custom one is that in the
database table behind the grid I accept values like 0,1,2 while to the user
I want to show ['0 open','1 suspended','2 closed'] (I also use a custom
- in my original application when the user enables a cell editor, scroll
the horizontal bar until that cell is hidden and click on another visibile
cell the application crashes (not the attached script but maybe you can see
if I make something that causes a memory corruption)
- I would like to prevent the user from leaving a cell editor active (for
example: if you enable a cell editor with a double click and scroll with
horizontal bar the editor remains active). I've tried to use
EVT_LEAVE_WINDOW but it doesn't work in my implementation because when the
dropdown list of the choice control should be displayed the editor is
closed. How can I get the desired behaviour?
thank you in advance,
Marco
--
You received this message because you are subscribed to a topic in the
Google Groups "wxPython-users" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/wxpython-users/kwD22-pg1XM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
For more options, visit https://groups.google.com/d/optout.
--
________________________________________
www.paneido.com

www.quantisoldi.it
--
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 wxpython-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Nathan McCorkle
2014-10-23 21:26:24 UTC
Permalink
Post by Marco Prosperi
hello, I'm trying to use the CustomCellChoiceEditor implemented as in the
attached example. The reason why I want a custom one is that in the
database table behind the grid I accept values like 0,1,2 while to the user
I want to show ['0 open','1 suspended','2 closed'] (I also use a custom
- in my original application when the user enables a cell editor, scroll
the horizontal bar until that cell is hidden and click on another visibile
cell the application crashes
by crashes do you mean:
1) Python generates an Exception (which you didn't paste)
or
2) Python segfaults or some other 'hard' crash, which does not generate an
exception
?

If 1) you need to paste the error traceback here, if 2) you should install
the faulthandler module and get some more info on the crash.

Also, it would be much much easier if you can adapt your example such that
it crashes for you, so we can see if it crashes for us too. It may not be
your problem, but for example a wxPython problem that may differ from one
operating system to another. Also if it crashes, we can more quickly
pinpoint the error.
Post by Marco Prosperi
(not the attached script but maybe you can see if I make something that
causes a memory corruption)
- I would like to prevent the user from leaving a cell editor active (for
example: if you enable a cell editor with a double click and scroll with
horizontal bar the editor remains active). I've tried to use
EVT_LEAVE_WINDOW but it doesn't work in my implementation because when the
dropdown list of the choice control should be displayed the editor is
closed. How can I get the desired behaviour?
thank you in advance,
Marco
--
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 wxpython-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Marco Prosperi
2014-10-23 22:18:31 UTC
Permalink
It's a hard crash. Thanks for pointing me faulthandler. Using it, I get
this:

Fatal Python error: Segmentation fault

Current thread 0x00000a5c:
File "C:\Programmi\Python27\lib\site-packages\wx-2.9.4-msw\wx\_core.py",
line
7952 in MainLoop
File "C:\Programmi\Python27\lib\site-packages\wx-2.9.4-msw\wx\_core.py",
line
8660 in MainLoop
File "main.py", line 183 in <module>

At line 183 of main.py I have this statement:

app_ui.MainLoop()

Marco
Post by Nathan McCorkle
Post by Marco Prosperi
hello, I'm trying to use the CustomCellChoiceEditor implemented as in the
attached example. The reason why I want a custom one is that in the
database table behind the grid I accept values like 0,1,2 while to the user
I want to show ['0 open','1 suspended','2 closed'] (I also use a custom
- in my original application when the user enables a cell editor, scroll
the horizontal bar until that cell is hidden and click on another visibile
cell the application crashes
1) Python generates an Exception (which you didn't paste)
or
2) Python segfaults or some other 'hard' crash, which does not generate an
exception
?
If 1) you need to paste the error traceback here, if 2) you should install
the faulthandler module and get some more info on the crash.
Also, it would be much much easier if you can adapt your example such that
it crashes for you, so we can see if it crashes for us too. It may not be
your problem, but for example a wxPython problem that may differ from one
operating system to another. Also if it crashes, we can more quickly
pinpoint the error.
Post by Marco Prosperi
(not the attached script but maybe you can see if I make something that
causes a memory corruption)
- I would like to prevent the user from leaving a cell editor active (for
example: if you enable a cell editor with a double click and scroll with
horizontal bar the editor remains active). I've tried to use
EVT_LEAVE_WINDOW but it doesn't work in my implementation because when the
dropdown list of the choice control should be displayed the editor is
closed. How can I get the desired behaviour?
thank you in advance,
Marco
--
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 wxpython-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...