Re: Newbie trying to get started



On Friday, October 10, 2003, at 03:48 PM, pat wrote:

I am using a 'everything install' of RH8.0 and have discovered that I
have 2 versions of Glade installed, ver 0.8.6 and ver 1.1.1. My problem
is that v1.1.1 _only_ gives me the option to use C or C++ whereas V0.8.6
gives me the perl option (plus others as I expected) which I want. I
would prefer to use V1.1.1.

the bigger difference is that version 1.1.1 works with Gtk+ 2.x and Gnome 2.x, but version 0.8.6 works with Gtk+ 1.x and Gnome 1.x.

version 1.1.1 doesn't offer an option to generate perl code because the gtk2 version of the glade-to-perl converter (http://www.glade-perl.connectfree.co.uk/) isn't quite ready for use (it doesn't work with Gtk2 1.00 without patching).

the best thing to do, in all honesty, would be to avoid the source code generation altogether, and use libglade to generate the gui directly from the raw glade file at runtime. the Gtk2::GladeXML module exists for this purpose. the binary packages are only about 20k, and there are several people on the list who can answer your questions on how to use it.

anybody care to post some example code? (we could use example code on the website, too.)

it can start as simple as:

  use Gtk2 -init;
  use Gtk2::GladeXML;

  $glade = Gtk2::GladeXML->new ('/path/to/interface/definition.glade');
  $glade->signal_autoconnect_from_package;
  Gtk2->main;

but to get any real functionality out of it, you'll have to add callback implementations.

--
muppet <scott at asofyet dot org>




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