Boa or Designer?

Robin Dunn wrote:

Will Sadkin wrote:

OTOH, AFAIK, wxDesigner isn't really set up for inheritance; it

[...]
Actually it does. Add a TextCtrl and then right click on it in the
tree, select edit control and then go to the advanced tab. You then
have a "Custom class" check box and a place to put the name.

Now that you mention it, I *do* remember learning this at some point,
but then apparently forgot again (it's been a while since I actually
had to use the designer to build a new GUI. <:-} ) Do you know if it
handles derivations once removed, ie custom classes derived from
custom classes derived from TextCtrl?

(Robin, have you had any conversations with Robert re: wxPython 2.5
and wxDesigner?)

Not yet. I was waiting until things solidified enough that I could
make a release for him to test with. I guess it is now time to write
that email. Have you (or anybody else) thought it through and made a
list of things that should be changed in the generated code? If so
then I can summarize that and discuss with Robert. If not then I'll
make my own list in the next few days.

(Seems a little late, actually, as now anyone trying to use wxDesigner
with 2.5 is likely to become extremely frustrated until the compatibility
is addressed...)

I have not had the time to go through my wxDesigner-generated code and
"peel the onion" to find all of the issues, as our production code
currently is written to and fielded with wxPython 2.4. However, the most
obvious ones I can think of are the use of tuples for positions and sizes
where two arguments were once used, and the elimination of AddWindow/Spacer
/Sizer in favor of just "Add()". But probably everything in your migration
guide should at least be considered; Robert will probably have a far better
idea of what will be affected than I/we? do.

A question: is it even possible to generate code that is compatible
with BOTH 2.4 or 2.5? If not, Robert, Riaan, and the others providing
code generators will either have to stop supporting pre 2.5 releases
with their next version, or somehow have a switch and lots of conditional
code to generate for one version or t'other... (Inquiring minds and all
that.)

Regards,
/Will Sadkin
Parlance Corporation
www.nameconnector.com

I suspect it will be a royal pain to support 2.5 specific features as well as 2.4, but it is possible to support both versions by continuing to use the 'from wxPython import wx' form of import and wx.wx style naming convention. They will probably have to change their initialization code and if they were still supporting versions prior to 2.4 then they may have to drop support of those earlier wxPython versions.

I think the simplest solution is to fork the code and have a stable version for 2.4 and an unstable (unstable in the API sense) version for 2.5/2.6.

ka

···

On Apr 12, 2004, at 7:41 AM, Will Sadkin wrote:

A question: is it even possible to generate code that is compatible
with BOTH 2.4 or 2.5? If not, Robert, Riaan, and the others providing
code generators will either have to stop supporting pre 2.5 releases
with their next version, or somehow have a switch and lots of conditional
code to generate for one version or t'other... (Inquiring minds and all
that.)

Will Sadkin wrote:

Robin Dunn wrote:

Will Sadkin wrote:

OTOH, AFAIK, wxDesigner isn't really set up for inheritance; it

[...]
Actually it does. Add a TextCtrl and then right click on it in the
tree, select edit control and then go to the advanced tab. You then
have a "Custom class" check box and a place to put the name.

Now that you mention it, I *do* remember learning this at some point,
but then apparently forgot again (it's been a while since I actually
had to use the designer to build a new GUI. <:-} ) Do you know if it handles derivations once removed, ie custom classes derived from custom classes derived from TextCtrl?

I think that all that matters is that the __init__ signature matches up.

A question: is it even possible to generate code that is compatible with BOTH 2.4 or 2.5? If not, Robert, Riaan, and the others providing code generators will either have to stop supporting pre 2.5 releases with their next version, or somehow have a switch and lots of conditional code to generate for one version or t'other... (Inquiring minds and all that.)

For widget creation, layout, binding events and etc. (which is most of what these tools deal with) it should be possible using the old namespace and etc.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!