From: Kevin A. <al...@se...> - 2004-05-20 18:09:02
|
On May 19, 2004, at 1:04 PM, Ruben Marquez wrote: > I know that it is not a simple matter to add support > for wxNotebook as things stand now. However, I was > wondering if plans are to do so in the future. I > noticed that wxPython now ships with XRC and an XRC > Editor. It looks like some of the goals of this > effort are simmilar to PythonCard's. Also, it seems > that they have some support for wxNotebook on it > already (although I have not yet figured out how it > all works). So, I wonder if PythonCard can benefit > from some of the work, code, or concepts from the XRC > project. > > Just wondering as I am currently having to go back to > raw wxPython for an app that I really think will be > better using wxNotebook. > I don't know, but I'm guessing that you'll be better off with raw wxPython in the short-term. There are a number of conceptual and code issues with supporting wxNotebook in the current PythonCard framework. Just creating a wxNotebook component would be a simple wrapper. Then there is the question of what goes into the wxNotebook pages. The current Background class is a wxFrame that contains a wxPanel and all the components go on that. What we probably need for wxNotebook is a lot of the Background functionality, but for it to just be a wxPanel. Every page in the wxNotebook would sort of be like a child window. The reference to a particular component on each page might be long-winded outside of the page itself, but when just referring to siblings it would look like it does today in a Background. Supporting wxNotebook in the resourceEditor is much more work and I would want to save that until the resourceEditor is refactored; I use the term refactored loosely since it will be more like building the beast from scratch. If PythonCard adopted the XRC file format the only sensible way to do that would be to start working with Roman Rolinsky and leverage the code he has already done on XRCed. We're still relying on some of the design decisions and simplifications we made in PythonCard several years ago and that is limiting some of the things we might do. One of the big reasons to finish off 1.0 without radically changing the basic PythonCard design is so that work can be started on 2.0, which might end up much more in sync with other wxWidget tools like XRC resource editor. One of the big questions is still who is the target audience for PythonCard 1.0 or 2.0? If someone is comfortable with wxPython then PythonCard 1.0 probably doesn't make much sense for them. The XRCed resource editor is just a way of editing XRC files. So it is analogous to the PythonCard resourceEditor as a way of building layouts. But it isn't a framework like PythonCard. If you adopted the PythonCard naming conventions for events, it would be relatively easy to adapt the PythonCard event binding that will be in release 0.8 and use that along with XRC files. That still requires the programmer to understand a lot more of the guts of wxPython, but would be very good solution for those that want it. Anyway, I would love to get feedback on what parts of Boa, wxGlade, XRC resource editor, etc. people on this list like and are comfortable with and what they don't like or find too daunting. ka |