Message131441
In the wxPython Demo the PropertyGrid code has the lines
#
# Let's use some simple custom editor
#
# NOTE: Editor must be registered *before* adding a property that
# uses it.
pg.RegisterEditor(TrivialPropertyEditor)
pg.RegisterEditor(SampleMultiButtonEditor)
pg.RegisterEditor(LargeImageEditor)
The first time you look at this demo, it runs. Then if you go to some other demo, and return back to this (in the same session), it tries to register the same editors. Since they are already registered this causes an AssertionError. I fixed it by
#
# Let's use some simple custom editor
#
# NOTE: Editor must be registered *before* adding a property that
# uses it.
try:
pg.RegisterEditor(TrivialPropertyEditor)
pg.RegisterEditor(SampleMultiButtonEditor)
pg.RegisterEditor(LargeImageEditor)
except AssertionError:
pass
although I am sure you can probably do better.
PS: This is my first visit to this site, so if I have posted this with some incorrect area, please just let me know kindly. |
|
Date |
User |
Action |
Args |
2011-03-19 20:37:57 | Arif.Zaman | set | recipients:
+ Arif.Zaman |
2011-03-19 20:37:57 | Arif.Zaman | set | messageid: <1300567077.69.0.560043007986.issue11611@psf.upfronthosting.co.za> |
2011-03-19 20:37:56 | Arif.Zaman | link | issue11611 messages |
2011-03-19 20:37:56 | Arif.Zaman | create | |
|