473,749 Members | 2,546 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

workaround for generating gui tools

Hi,

i create my GUIs mainly via wxGlade. However when you start of to
program and want to do some rearranging to the gui, wxglade overwrites
your file and you've got to put your own code back in.

I think i can work around that (at least a bit) by making a second file
that imports the gui generated by wxglade and make classes that extend
the original ones.
For instance i could have a class MainForm that extends the wxFrame
class that wxGlade produces.

Are there other clever ways to work around this problem?

Thanks,
Benedict
Jul 18 '05 #1
17 2135
Benedict,

Best to hand-code your code ;-) -- even GUI. This is kind of why I like
Tkinter so much. Good luck.

Harlin Seritt

Jul 18 '05 #2
Harlin Seritt wrote:
Benedict,

Best to hand-code your code ;-) -- even GUI. This is kind of why I like
Tkinter so much. Good luck.


Have to disagree strongly.

It's evil anyway (for more complex applications) to put GUI construction
in your code. GUI should be described appropriately in data files.

Glade does this very good, and with pygtk it's no problem to use the XML files.

Reinhold
Jul 18 '05 #3
Reinhold Birkenfeld wrote:
Have to disagree strongly.

It's evil anyway (for more complex applications) to put GUI construction
in your code. GUI should be described appropriately in data files.

Glade does this very good, and with pygtk it's no problem to use the XML files.

Reinhold


So the GUI should be seperate from the code. Is the way i described
valid then? Extending from the gui class and putting event handlers in
the derived classes?
Or is there a better way to seperate the GUI from the code?

Benedict
Jul 18 '05 #4
Reinhold Birkenfeld wrote:
It's evil anyway (for more complex applications) to put GUI construction
in your code. GUI should be described appropriately in data files.


why use data files when you have an extremely powerful programming
language in your toolbox? the advantage of building UI's in Python is
that you can quickly create "domain specific UI languages", and use them
to generate the interfaces for you. UI editors may be useful for trivial
applications, but if you're doing complex stuff, you sure want domain-
specific abstractions. Python gives you that, XML files don't.

</F>

Jul 18 '05 #5
> why use data files when you have an extremely powerful programming
language in your toolbox? the advantage of building UI's in Python is
that you can quickly create "domain specific UI languages", and use them
to generate the interfaces for you. UI editors may be useful for trivial
applications, but if you're doing complex stuff, you sure want domain-
specific abstractions. Python gives you that, XML files don't.


If you do some creative rearranging of widgets and play around with
different layouts and geometry managers, a good gui-designer becomes very
useful.
--
Regards,

Diez B. Roggisch
Jul 18 '05 #6
On Sat, 09 Apr 2005 19:59:18 +0200, Diez B. Roggisch wrote:
why use data files when you have an extremely powerful programming
language in your toolbox? the advantage of building UI's in Python is
that you can quickly create "domain specific UI languages", and use them
to generate the interfaces for you. UI editors may be useful for trivial
applications, but if you're doing complex stuff, you sure want domain-
specific abstractions. Python gives you that, XML files don't.


If you do some creative rearranging of widgets and play around with
different layouts and geometry managers, a good gui-designer becomes very
useful.


Domain-specific abstractions do that *faster* than GUI designers, not
slower. And better, too, since every iteration tends to be fully
functional and not just a "let's see what this looks like" prototype.

Heck, switch 'em out dynamically based on what day of the week it is and
how the user feels today. Let's see your GUI-designer do that.

And if you're not used to doing it that way, you'll be *stunned* at how
much stuff tends to factor out and get easily re-used.

An approach that has more data to work with (some idea of what things are
doing and what they are for) will beat an approach with less data ("thing
at row 4, col 2" or, worst case, "thing at 233,144") any day.

GUI designers are like the regexs in the famous jwz quote: "Some people,
when confronted with a problem, think 'I know, I'll use a GUI designer'.
Now they have two problems." Both have a niche in the "quick fix"
department, both are typically over-used, but overall regexs are the more
useful of the two; at least there are cases where they are the undisputed
right answer (like defining tokens in a language parser).

Generally, over the first couple of weeks of a project, the
domain-specific language writer may seem to be behind the GUI designer
cranking out screen after screen of templated GUI widgets, but after a
couple of weeks the domain-specific language user will pull into the lead
and never give it up, and will be a lot happier to boot.
Jul 18 '05 #7
Jeremy Bowers wrote:

<snip>

Domain-specific abstractions do that *faster* than GUI designers, not
slower. And better, too, since every iteration tends to be fully
functional and not just a "let's see what this looks like" prototype.

Heck, switch 'em out dynamically based on what day of the week it is and
how the user feels today. Let's see your GUI-designer do that.

And if you're not used to doing it that way, you'll be *stunned* at how
much stuff tends to factor out and get easily re-used.

An approach that has more data to work with (some idea of what things are
doing and what they are for) will beat an approach with less data ("thing
at row 4, col 2" or, worst case, "thing at 233,144") any day.

GUI designers are like the regexs in the famous jwz quote: "Some people,
when confronted with a problem, think 'I know, I'll use a GUI designer'.
Now they have two problems." Both have a niche in the "quick fix"
department, both are typically over-used, but overall regexs are the more
useful of the two; at least there are cases where they are the undisputed
right answer (like defining tokens in a language parser).

Generally, over the first couple of weeks of a project, the
domain-specific language writer may seem to be behind the GUI designer
cranking out screen after screen of templated GUI widgets, but after a
couple of weeks the domain-specific language user will pull into the lead
and never give it up, and will be a lot happier to boot.


First time i hear about domain-specific abstractions.
Do you mean that instead of using a GUI designer, you make some sort of
engine that constructs a gui for you?

One thing i find repetitive to do is designing gui's that are just
simple views on a database tables where one can create,edit and delete
records. If one could construct a gui dynamically for these types of
things, that would be great.

Benedict
Jul 18 '05 #8
> Domain-specific abstractions do that *faster* than GUI designers, not
slower. And better, too, since every iteration tends to be fully
functional and not just a "let's see what this looks like" prototype.
Can you show me some working, in-use example for that? I _seriously_ doubt
that the process of rearranging and tuning the layout can be done faster in
the text-world than with a good designer like qt-designer. But I'm all ears
for better solutions.

BTW, when I talk of gui designers, I _only_ have them for creating guis - no
attaching of event code or stuff like that (except from some trivial
signal-slot-connections, that is)

As a programmer, the only thing of interest to me are the certain widgets I
need my logic to bind to. The structure of the thing itself I don't care
about.

Heck, switch 'em out dynamically based on what day of the week it is and
how the user feels today. Let's see your GUI-designer do that.

And if you're not used to doing it that way, you'll be *stunned* at how
much stuff tends to factor out and get easily re-used.
Well - stun me by example :)

An approach that has more data to work with (some idea of what things are
doing and what they are for) will beat an approach with less data ("thing
at row 4, col 2" or, worst case, "thing at 233,144") any day.


Hm. There certainly are cases where I take smaller building blocks and
rearrange them according to my current needs - all in python of course. But
that's only a comparably small part - at least to my current apps. It
could grow depending on the type of application - e.g. database driven
stuff - but so far, I'm pretty well with creating the larger
dialogs/widgets in the designer and when the functionality is working, the
rearranging of these widgets for better usability is pretty important and
certainly easier done in the designer.

To me the whole discussion is similar to generating html using python or
using templates - templates need only to conform to a certain interface for
the app writer to work. Sure, sometimes things get a little bit more
tedious compared to just printing out html fragments. But the more control
you want over the look of your results, the less powerful the generating
approach becomes - because you simply lack the features to control the
layout or you take deep steps into parameter hell - but then I see html as
a domain specific language and prefer to use that to control the layout.

I've seen such development in the java-world using struts, where people
introduced their own tags for displaying data objects - over time, some of
these grew 10 or more cryptic attributes for fine-controlling the layout.
Instead of just providing the necessary data and letting jsp do the layout.

--
Regards,

Diez B. Roggisch
Jul 18 '05 #9
On 2005-04-09, flupke <fl****@nonexis tingdomain.com> wrote:
i create my GUIs mainly via wxGlade. However when you start of to
program and want to do some rearranging to the gui, wxglade overwrites
your file and you've got to put your own code back in.


How about generating XRC files instead of Python? I admit I've never tried
it with wxGlade, so I don't know how well it works, but with the original
Glade one only uses XML, you can't generate Python at all.

Dave Cook
Jul 18 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1904
by: Dan Gass | last post by:
The difflib.py module and the diff.py tools script in Python 2.4 alpha 3 now support generating side by side (with intra line differences) in HTML format. I have found this useful for performing build release comparisons (I use a script to generate a main page showing all the files that were changed in a build with hyperlinks to side by side differences for each of those files). I also find it useful for generating HTML test reports to...
13
4646
by: Tim Henderson | last post by:
Hi I want to dynamically generate a graph in python that would be displayable on a web page. What would be the best way to do this? The reason I want to do this, is because I am making a program to convert data from scientic probes into web pages. I have been able to do every thing except the graph generation. Your help would be much appriciated
1
3561
by: Mark | last post by:
Hi - apologies in advance if this is not the correct forum - tried searching loads, and still to find a workable solution. Generating a word document from ASP - no problem. Inserting page breaks into the generated page, so that when loaded into Word it forces a page break, I cannot manage: No matter if I use: <p STYLE="page-break-after: always"></p>
1
1529
by: Jack Notarangelo | last post by:
Hello, I am interested in anyone's preference as to creating datasets in code vs generating them using the UI. I know typing is an advantage of the latter method. But any other information would be welcome. Thanks in advance! Jack
1
3344
by: Comcast | last post by:
I understand that one of the limitations of the Image.GetThumbnailImage() function is that it's not really good for creating "large" thumbnails because if it exists in the image file, the function will take the embedded thumbnail and actually blow it up to the requested height/width. Does anyone know if Microsoft will be fixing this "feature" or whether there's a work around to force the function to use the full image to scale? Thanks...
1
1091
by: moondaddy | last post by:
I have several web apps that need to be cross browser compatible, however, I don't have the time to learn how to write html and css files for Netscape and all the other main stream browsers out there. Can anyone recommend some good tools that I could use to model out a webpage for 1 or more non-i.e. browsers. from there I could see the difference in it's html and the html I wrote for i.e.. I would also want it to have a wizard to create...
9
2391
by: Mickey Segal | last post by:
The long-simmering Eolas patent dispute: http://www.microsoft.com/presspass/press/2003/oct03/10-06EOLASPR.mspx has led to an optional Microsoft Update: http://support.microsoft.com/kb/912945/en-us that creates non-JavaScript problems that can be fixed using JavaScript. With the Microsoft update installed, Java applets (as well as other content such as Flash videos) are unable to receive user input until an activating click or key press....
6
3107
by: Kürþat | last post by:
Hi, I want to get all key press messages and for some keys I want to generate extra key press messages to simulate fast typing. For example if someone press 'H' my app should catch and change it with "Hello". It should work system wide. I know little about hooks and playback but it does not help me. I am waiting for your help. Thanks in advance.
37
3742
by: Allen Browne | last post by:
If you develop for others, you probably have multiple versions of Access installed so you can edit and create MDEs for clients in different versions. This works fine under Windows XP, even with Access 2007 installed. It does *not* work under Windows Vista Ultimate. After running Access 2007, when you open an earlier version of Access, no code works, because the references are fouled up. And Access 97 does not work at all. Access should...
0
8996
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8832
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
9333
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9254
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8255
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6078
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4879
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3319
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2217
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.