Still Loving Python

?

=?iso-8859-1?q?J=E9r=F4me_Laheurte?=

It isn't often done, but I quite like the idea of giving users the GUI
builder so that they can specify their preferred task interface, at
least to a first approximation.

That would be a valid use for these things, prototyping the UI. Or making
mock-ups for usability testing.
 
P

Peter Decker

It's my impression that code generation leads to more duplication
and less code reuse. It's easy to whip up a new class or window
that duplicates a lot of already existing code, with those graphical
tools.

Of course, Visual designer != code generation

Code generation tends to be sloppy and strictly 1-way. In most cases,
you can't edit it manually and then open the design back up in the
visual tool.
 
B

Bengt Richter

Click? Yuck. If I wanted it, I've had environments where a single
keystroke (much better) compiled, linked and ran the resulting
app. Not in a fraction of a second, but that's sort of irrelevant to
the GUI/non-GUI question.
You don't have to click. A single keystroke (F9) does it too ;-)
Just that if you are testing for a hint appearing when you mouse over a button,
it's handier to move the cursor a coule of inches and click a Delphi IDE button
with the same hand than it is to go for F9. But either way works.
An integrated debugger that lets you step through your app and watch the visuals
happen as you step by various chunks or run to breakpoints etc is useful sometimes too.

You can also do totally command-line oriented, non-GUI stuff much as you'd do C, except
in object pascal. A minimal app:

[11:51] E:\UTIL\log>type hw.dpr
program Hw;
{$Apptype Console}
begin
Writeln('Hello World');
end.

[11:51] E:\UTIL\log>dcc32 hw.dpr
Delphi for Win32 Version 10.0 Copyright (c) 1983,97 Borland International
hw.dpr(6)
7 lines, 0.02 seconds, 10184 bytes code, 1377 bytes data.

[11:51] E:\UTIL\log>dir hw.*
Volume in drive E is Non-MS
Volume Serial Number is 3C7A-BC1A

Directory of E:\UTIL\log

05-12-14 11:47 73 hw.dpr
05-12-14 11:51 15,360 hw.exe

Regards,
Bengt Richter
 
V

Valentino Volonghi aka Dialtone

Paul Rubin said:
Glade also does something like that.

Indeed. I'd also add some lines on this.

There is a very nice designer for GTK+ applications called Gazpacho,
written in python and available here: http://gazpacho.sicem.biz/

It generates an XML file in the same Glade format (actually it's
slightly different for the Menus). It doesn't require libglade though
because it has its own .glade loader and thanks to this at load time it
can bind events using method names in your 'controller' class (which
inherits from gazpacho's Proxy class.

This means that, if you are using python, you don't even have to define
the actions and action handlers in the designer.

for example:

class LogsterClient(Proxy):

def on_connect__clicked(self, button):
....
....

def on_logster__destroy(self, window):
....
....

p = Proxy('my_ui.glade')

And it also provide an easy and flexible way to integrate additional
custom widgets in the design process.

Of course it's always possible to build powerful GUIs without using
designers at all:

http://www.lethalman.net/?p=21
 
M

Mike Meyer

You don't have to click. A single keystroke (F9) does it too ;-)

F9? Better, but not much. Especially considering that my desktop keyboard
doens't have an F9 key: <URL:
http://www.tldp.org/linuxfocus/English/January1999/article75.html >.
Just that if you are testing for a hint appearing when you mouse over a button,
it's handier to move the cursor a coule of inches and click a Delphi IDE button
with the same hand than it is to go for F9. But either way works.

That doesn't sound like a likely sequence - if the hint appears, then
you're done with that and it's time to code. If the hint doesn't
appear, then you're not done, and you have to fix the things, which
means taking your hands off the mouse to type the hint in.
An integrated debugger that lets you step through your app and watch the visuals
happen as you step by various chunks or run to breakpoints etc is useful sometimes too.

Yup. I like mine very much. But that's got nothing to do with how the
GUI is built.
You can also do totally command-line oriented, non-GUI stuff much as you'd do C, except
in object pascal. A minimal app:

You now seem to be trying to sell a language.

<mike
 
P

Paul Boddie

Jérôme Laheurte said:
I didn't see anything wrong... Encoding problem ?

The preview and subsequent re-editing page typically show trashed
non-ASCII characters in Konqueror, which doesn't usually show such
brokenness on the pages I view, but I've become accustomed to taking
evasive action and editing my messages in the re-editing page which
then seems to respect what I've typed.

Anyway, here's a straight response without preview. Let's see how it
turns out!

Paul
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top