From: Alex T. <al...@tw...> - 2006-04-19 22:39:33
|
Winston Wolff wrote: > Is anybody thinking about integrating XRC files in PythonCard? > > Here are my reasons why it would be a good idea: > - Could use a number of GUI builders such as wxGlade. > - PythonCard's resourceEditor has problems including: > - on Mac OS X grow handles don't appear > - on Mac OS X sizes get "stuck" and I can't grow widgets As far as I know, these two have been fixed in the latest version (layoutEditor in 0.8.2, only in cvs). If you aren't using that, I'd recommend an update (you can get it using anonymous cvs access - see instructions under "Development" on the left menu of www.pythoncard.org And if you're already using the latest version and still seeing these problems, I'd appreciate a full bug report so I can fix them :-) > - Layouts/Sizers are not supported. > I agree that's a problem. Partly it's because there's something of a conflict between the desirability of using sizers (on the one hand) and the desire to keep it simple and quick to make a basic app in PythonCard (I've yet to see a sizer-based layout editor that I'd describe as simple or quick). > I'm thinking about a resource loader in PythonCard that would load an > .XRC file (XML file written out by wxGlade or XRCed) and then do the > regular PythonCard magic for binding events to widgets. > I think the tricky part will be deciding what to do when the XRC file contains controls, options or values that PythonCard doesn't support. > The great thing about PythonCard is how it links up widgets and > handlers automatically, saving great amounts of time and simplifying > your code. Probably when it was first written, wxPython GUI editors > were not very good, or didn't exist. But now they are better than > PythonCard's resourceEditor. Let's leverage other's work on GUI > editors, and take the good part from PythonCard. > > Would anybody use this? Would I be allowed to add it to the > sourceforge repository? Any other technical issues? I'd give it a try (of course), but whether or not I'd use it is a much harder question. That would depend on the features and "style" of the GUI editors that can create xrc files. The issue I have with all the sizer-based GUI editors I've seen is that they work best when you already have a good idea of what your finished UI is going to look like (including how you want the controls split into sizers), whereas I tend to build the UI incrementally, adding controls, moving them around, etc. as the project evolves. Then (at some point) it feels settled enough that I could reasonably design a sizer tree and start allocating controls to branches of it. (currently of course I need to do that in code, which feels "wrong" but not too bad because it rarely changes much after that). It's been a while since I looked at the range of editors available, so if there is one that handles sizer-tree reconfiguration well I'd be very happy to hear about it. Assuming it was completely "parallel" to existing stuff, I can't see a reason why it couldn't be added to the repository. I think the main technical issue will be the mis-match between the set of controls presented by the editor(s) and what can actually be handled by PythonCard (but that's an off-the-cuff response - I'll give it some thought (and take a closer look at the editors and xrc itself and get back to you if I see anything else looming ....) -- Alex Tweedly http://www.tweedly.net -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.385 / Virus Database: 268.4.4/318 - Release Date: 18/04/2006 |