Thread: [PythonReports-users] Migrating PythonReports editor to wxPython 2.9
Brought to you by:
a1s
From: kacah <kac...@gm...> - 2012-12-08 15:40:16
|
First of all I think I should create new discussion for PythonReports editor problems onwxPython 2.9, because of "Patch for editor save and save-as options" is not the problem, and I don't know why are you discussing all bugs under that topic. That's why I think mailing lists are completelyunreadable... 1) Plate Button has _SetState method instead of SetState in wxPython 2.9. So the fix is simple. Just replace all "SetState" occurrences in PythonReports/editor/elements/container.py file to "_SetState". 2) There are some background color problems with Plate Buttons. Background color of Elements tree also should be fixed. 3) "..." missing in list elements, because of PropertyGrid is for "wxPython 2.8". "..." is missing in all non standart PropertyGrid properties (in all, that starts with Py...). ListProperty is inherited from PyLongStringProperty, so it also has this bug. 4) There were huge problems with size, minsize and sizer of sections developing this editor, so for now I don't know normal solution for minsize problem. I believe we should search for it only after wxPython 2.9 release, because of it may not work with current wxPython 2.8 version. I suggest you to use wxPython 2.8 with PythonReports for now. If you wan't to use wxPython 2.9 in your projects maybe this can help you: http://www.wxpython.org/docs/api/wxversion-module.html |
From: Werner F. B. <wer...@fr...> - 2012-12-08 18:05:48
|
Hi, On 08/12/2012 16:39, kacah wrote: > First of all I think I should create new discussion for PythonReports > editor problems onwxPython 2.9, because of "Patch for editor save and > save-as options" is not the problem, and I don't know why are you > discussing all bugs under that topic. That's why I think mailing > lists are completelyunreadable... Sorry, you are right should have continued with different threads, one for each issue. > > 1) Plate Button has _SetState method instead of SetState in wxPython > 2.9. So the fix is simple. Just replace all "SetState" occurrences in > PythonReports/editor/elements/container.py file to "_SetState". Yes, one could just change it to _SetState (as I did in the suggested patch), but I don't understand why you even call SetState - was it a problem in 2.8? The code in editor.elements.container.py for e.g. OnLeftDown is as far as I can see already done in platebtn.OnLeftDown handler, so couldn't the OnLeftDown and even highlight methods be removed or made conditional (e.g. using "if wx.VERSION > (2, 9, 0, 0)") on 2.8 if there was/is an issue with this in 2.8. > > 2) There are some background color problems with Plate Buttons. > Background color of Elements tree also should be fixed. There was a thread on the wxPython list just the other day and I believe Cody has a fix for it but wants to do more testing. > > 3) "..." missing in list elements, because of PropertyGrid is for > "wxPython 2.8". "..." is missing in all non standart PropertyGrid > properties (in all, that starts with Py...). ListProperty is inherited > from PyLongStringProperty, so it also has this bug. Yes, I understand that you have based this on the sourceforge version of the PropertyGrid which only became part or was wrapped by Robin for wxPython in the 2.9 series. Again if the one change I suggested causes an issue in 2.8 then why not make it conditional on the wx version. > > 4) There were huge problems with size, minsize and sizer of sections > developing this editor, so for now I don't know normal solution for > minsize problem. I believe we should search for it only after wxPython > 2.9 release, because of it may not work with current wxPython 2.8 version. wxPython 2.9 is released, there is already 2.9.4 and according to Robin 2.9.5 will soon come out. Do you mean to wait for 3.0? Wouldn't you want to keep PythonReports compatible in one source code for 2.8.x and 2.9.x and maybe (if needed) create a non backwards compatible version for wxPython Phoenix? Sizer handling has changed in 2.9 and some of it in a non backwards compatible way (lots of discussion on the wxWidget and wxPython list some time ago - overall goal was to make it cleaner better if I correctly understand what was said), so I would think the sooner one starts to test with 2.9x the better for everyone as maybe there are some issues the wx team might want to fix before 3.0 comes out. If some of these changes cause issues with 2.8.x then maybe still do them but have in a few places conditional code based on version. > > I suggest you to use wxPython 2.8 with PythonReports for now. If you > wan't to use wxPython 2.9 in your projects maybe this can help you: > http://www.wxpython.org/docs/api/wxversion-module.html The above won't work for me as I am planning to call PythonReports from within my application and maybe (not decided yet) provide the designer in my application distribution package (I use py2exe'd at this point but will look at other "freezer" packages and maybe even totally review/change the way I distribute early next year). My application, only works with 2.9+, and my application will not be released before the middle of 2013 with testing starting in early 2013 for at least 6 month. I am more then happy to be a "guinea pig" for the 2.9 version of PythonReports and to keep reporting issues I come across and if I can even suggest a patch. Best regards and have a nice weekend Werner |
From: alexander s. <al...@go...> - 2012-12-09 08:01:59
|
On 08.12.2012 20:07, Werner F. Bruhin wrote: > >> 1) Plate Button has _SetState method instead of SetState in wxPython >> 2.9. So the fix is simple. Just replace all "SetState" occurrences in >> PythonReports/editor/elements/container.py file to "_SetState". > > Yes, one could just change it to _SetState (as I did in the suggested > patch), but I don't understand why you even call SetState - was it a > problem in 2.8? Yes, why? >> 3) "..." missing in list elements, because of PropertyGrid is for >> "wxPython 2.8". > > Again if the one change I suggested causes an issue in 2.8 > then why not make it conditional on the wx version. Your change works well with 2.8 and is included in PythonReports version 0.6.1. > Wouldn't you want to keep PythonReports compatible in one source code > for 2.8.x and 2.9.x I would definitely want that. Best wishes, alex. |
From: Werner F. B. <wer...@fr...> - 2012-12-09 09:02:40
|
Alex and Den, Thanks for your answers. I will merge Alex's latest changes with my local stuff, to be able to retain "persist" and "WIT" and will continue to learn/test/work with PythonReports using wxPython 2.9.4+. Have a nice Sunday Werner |