Colin Barnette
2009-04-28 19:12:10 UTC
Hello wx-users!
I have been stuck on a wxPython project for a while, and I am having
trouble finding out just what the trouble is! Let me explain...
I am writing a very simple data editor that opens a file containing a
pickled database-like dict. The dict is parsed and then you can edit the
key/data pairs. The problem arises when I am working in my edit Dialog.
If the data section (a plain multi-line TextCtrl) is too long, it is
truncated. The length of the content though is small, for example I
notice the cutoff at a measly 508 characters! My operating system is
Windows XP.
The source code (html): http://www.colinbarnette.net/code/spyditor.html.
The Python file: http://www.colinbarnette.net/code/spyditor.py
Sample data file: http://www.colinbarnette.net/code/spyder
Apologies for the lack of commenting. I think the culprit is somewhere in
the class EditDialog, as I notice that if I edit the data that is too
large, adding a few characters, then commit the changes by pressing ‘OK’,
immediately the changes are lost as they are not reflected in the main
window nor when you edit the data item again. But honestly the code is so
simple I don’t see how this could be in the code. I am thinking it is some
problem with wxPython or this implementation of wxPython on Windows.
Is it a problem with the pickling? The wxPython? Windows? Any assistance
is greatly appreciated!
Thanks a bunch,
Colin Barnette
I have been stuck on a wxPython project for a while, and I am having
trouble finding out just what the trouble is! Let me explain...
I am writing a very simple data editor that opens a file containing a
pickled database-like dict. The dict is parsed and then you can edit the
key/data pairs. The problem arises when I am working in my edit Dialog.
If the data section (a plain multi-line TextCtrl) is too long, it is
truncated. The length of the content though is small, for example I
notice the cutoff at a measly 508 characters! My operating system is
Windows XP.
The source code (html): http://www.colinbarnette.net/code/spyditor.html.
The Python file: http://www.colinbarnette.net/code/spyditor.py
Sample data file: http://www.colinbarnette.net/code/spyder
Apologies for the lack of commenting. I think the culprit is somewhere in
the class EditDialog, as I notice that if I edit the data that is too
large, adding a few characters, then commit the changes by pressing ‘OK’,
immediately the changes are lost as they are not reflected in the main
window nor when you edit the data item again. But honestly the code is so
simple I don’t see how this could be in the code. I am thinking it is some
problem with wxPython or this implementation of wxPython on Windows.
Is it a problem with the pickling? The wxPython? Windows? Any assistance
is greatly appreciated!
Thanks a bunch,
Colin Barnette