Re: Design Issues - Getting started with GUI interfaces.
- From: Carl Nygard <cjnygard fast net>
- To: Tyler Hepworth <raklet gmail com>
- Cc: gtk-perl-list gnome org
- Subject: Re: Design Issues - Getting started with GUI interfaces.
- Date: Wed, 03 Nov 2004 15:49:54 -0500
On Wed, 2004-11-03 at 15:39, Tyler Hepworth wrote:
I have been programming perl for sometime, but this is my first go at
designing GUI interfaces. I am coming up against the best way to
design GUIs and would appreciate some hints on how best to structure
my code. Here is an explanation of my specific problem:
Files:
main.pl
Main.pm
DB.pm
Farm.pm
main.pl - makes call to sub mainLoop in Main.pm that starts the program
Main.pm -
sub mainLoop {
-called a sub to create a tree (createTree)
-create an HPaned object and place the tree in it
-place the HPaned into a window
-show all
-etc
}
sub createTree {
-call a routine in DB.pm to get values for the tree store
-build the tree store and tree view
# here is the problem area
-connect the tree view to a signal_connect (row-activated)
-have anonymous subroutine to get data from the activated row
-pass the data to Farm.pm and construct a widget that displays
detailed information about the row clicked on in the tree.
This widget has to get back to mainLoop so that it can be
added to the HPaned object and displayed. How can I add this
new widget to the HPaned without setting Global variables (our)
and other types of ugliness.
Try a dialog, it'll have ok/cancel buttons, which you can use to trigger
possible updates.
Also look at libglade, could make some of your widget creation code much
simpler.
-return the tree to mainLoop
}
Am I going about this the right way? Any suggestions on what to
change or how to improve?
Thanks for any suggestions,
Tyler Hepworth
_______________________________________________
gtk-perl-list mailing list
gtk-perl-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-perl-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]