Re: Design Issues - Getting started with GUI interfaces.

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: - makes call to sub mainLoop in that starts the program - 

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

sub createTree {
   -call a routine in 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 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

   -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

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]