in reply to Something I wanted to share with the group.

have you played with glade before?

i don't know about most of you, but i find X/GTK programming to be highly non-trivial. Glade is a GUI builder written in C and GTK. You can set up the user interface and tie particular actions to subroutines elsewhere. I've used it in C, but it (supposedly) can generate perl and python as well. I wouldn't consider the use of something like this as a "bad thing", as it still forces you to have functional and solid code underlying the fancy top....

BlueLines

Disclaimer: This post may contain inaccurate information, be habit forming, cause atomic warfare between peaceful countries, speed up male pattern baldness, interfere with your cable reception, exile you from certain third world countries, ruin your marriage, and generally spoil your day. No batteries included, no strings attached, your mileage may vary.
  • Comment on RE: Something I wanted to share with the group.

Replies are listed 'Best First'.
RE: RE: Something I wanted to share with the group.
by Aighearach (Initiate) on Aug 20, 2000 at 16:19 UTC

    Glade also has support for Perl. I gave this a try recently, to see if it would be usable for the Gtk/Perl Internet Chess Server client I am writing. I found it to produce pretty good code, but there are a few things I didn't like.

    First of all, instead of a script it produces a module. While this is the form I want my program's interface in, this behavior should be optional. Particularly because you end up with a Gtk object that you won't know how to use if you don't already know Gtk, or fish an example out of the distribution. To me this lack of flexability means it should not be used as a substitute for learning Gtk.

    Another problem is, it makes complex GUIs more difficult to build. If you just want to display a dialog with a couple buttons, fine. But if you have any sort of layered or variable layout, then it's not a good sollution. For example, drawing the board in my chess client. We need not only an 8x8 grid of colored pixmaps, but also another, initially blank, grid of pixmaps to display the pieces. Now, writing this by hand it is obvious that I want to represent the board as a data structure, populate it and show the widgets, and end up with an easy interface to access these widgets again later. Handcoding, this is fairly straightforward. But, using Glade it becomes more difficult, because you have to interact with the GUI via two different paradigms at the same time; the visual representation, and the logical representation in the code. Personally, if I am going to have to understand how the code creates the widgets anyway, then I'd rather be using my favorite editor than coding in Glade, with the other widgets in my way, and whathaveyou.

    Also, what if I create my program in Glade, release it, and then people start submitting patches? After adding these in, will I still be able to use Glade? Certainly I couldn't tell everybody else to code in Glade. And, it would be an embarrassing situation if I was neglecting to include bug fixes to my code, on account of not understanding my code in the first place...

    Paris Sinclair    |    4a75737420416e6f74686572
    pariss@efn.org    |    205065726c204861636b6572
    http://sinclairinternetwork.com