Defining VCL-like framework for Python (OT in comp.lang.python)

Hans Nowak ivnowa at hvision.nl
Mon May 24 16:51:48 EDT 1999


On 24 May 99, Roberto Lupi wrote:

> [this is off topic in comp.lang.python, I have set the follow-up to 
> comp.lang.pascal.delphi.misc]
> 
> In article <199905191942.VAA26784 at axil.hvision.nl>, ivnowa at hvision.nl 
> says...
> > It's a matter of taste and choice. One area where Delphi bites me is that 
> > when you design X forms, only slightly different, you have to design all X of 
> > them from scratch. Sure, you can copy & paste and such, but when you need to 
> > change code, you'll have to do it in all the forms. Not very maintainable. -- 
> > Of course experienced Delphi "programmers" have ways to avoid or minimize 
> > this, but my point is, putting the layout of the form in code does have its 
> > benefits. In Python/Tk, you can design a more or less abstract class, then 
> > derive from it.
> 
> Delphi has support for what you describe for very long time (since Delphi 
> 2 if I remember correctly, perhaps from Delphi 1). It's called Visual 
> Form Inheritance in Delphi-speak.
> 
> Look up "Object Repository" in the help file.
> 
> It's simple: if you want to derive from an existant form, just select 
> File|New... go to the tab with the same name as the current project, 
> select the ancestor form and check that Inherit is the selected item in 
> the radio group at the bottom.

I need to check that out again, because admittedly I don't know too 
much about the finer points of Delphi yet, despite being a 
professional Delphi developer. <frown/wink>

Actually, what I (also) meant is that you can write a class in 
Python, then use it - or it descendants - as a form or as a 
component. In fact you could use such a class as a form now, but its 
descendant as a window, etc. Since I am more or less used to doing 
this (== multiple uses for classes), and to Python's OO principles in 
general, I tend to avoid inheritance issues in Delphi.

I think a VCL-like framework written in Python would be lots more 
flexible than Delphi's Object Pascal. Whaddya think?

Veel liefs,

--Hans Nowak (ivnowa at hvision.nl)
Homepage: http://fly.to/zephyrfalcon




More information about the Python-list mailing list