Defining VCL-like framework for Python

Christian Tismer tismer at appliedbiometrics.com
Sat May 22 11:20:50 EDT 1999


Alexander Staubo wrote:
> 
> In article <199905191942.VAA26784 at axil.hvision.nl>, ivnowa at hvision.nl
> says...
> [snip]
> > >> >Delphi is particularly good -- especially compared to such toolkits as
> > >> >Microsoft's MFC -- because it offers clean OOP concepts,
> > >>
> > >> Hmm, it's not that clean, but that's not the point here... :)
> > >
> > >It's arguably cleaner and more robust than Python's OO implementation, but
> > >possibly that's just me.
> >
> > 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 4 supports form inheritance, which essentially means you can do
> what you say can't be done: Design a generic base form, and derive
> specialized from that form.

As a side note, this was already possible with Delphi 3.

And I think you also know (mut others might not) that
Delphi forms can be written out as plain Ascii files,
as a very simple nested structure. The routine is available
to the programmer, so you might even want to write out a
form definition from a form which has been run and already modified.

What I try to explain is: One way to get something rather quickly
could be to produce the DFM files from Python, and to have
a converter between these and a pickleable Python version.
Not need to handle .dfm files, since they can be tought
to a small Delphi app which does this call for you.

Despite the fact that you are thinking of a platform
independent framework/VCL, I could dream up a scenario which
gives you early results for just *one* Platform:

Write a Delphi app which contains the most common controls
which you will need. Provide it with functions to duplicate
these objects, hide them if not necessary, modify size,
some other attributes.... well, this would give you a bit
of the interactive Delphi IDE when constructing forms.
The current state of the form can now be saved as a .dfm,
and in Ascii form.
Pased by Python, you have the full flexibility to modify
the forms state further at wilt.

A step further.
Given that, assume that you wrapped certain properties and
events by a small number of COM functions which call back
into a Python COM server, couldn't that be a showdown
which would come quite near to what you are aiming at?

Maybe it's not all you're after, but I thought to
mention it since I see a shortcut which could
give you results very early.

ciao - chris

-- 
Christian Tismer             :^)   <mailto:tismer at appliedbiometrics.com>
Applied Biometrics GmbH      :     Have a break! Take a ride on Python's
Kaiserin-Augusta-Allee 101   :    *Starship* http://starship.python.net
10553 Berlin                 :     PGP key -> http://wwwkeys.pgp.net
PGP Fingerprint       E182 71C7 1A9D 66E9 9D15  D3CC D4D7 93E2 1FAE F6DF
     we're tired of banana software - shipped green, ripens at home




More information about the Python-list mailing list