Re: Is "The Official GNOME 2 Developer's Guide" from No Starch Press good for gnome-perl?

Thanks for taking the time to read my guide.  I apologize for being very
slow to respond.

On Sun, 2004-07-04 at 13:08 +0200, Torsten Schoenfeld wrote:
On Thu, 2004-07-01 at 17:33, Elijah P Newren wrote:

(Also, let me just note that if there are any Gtk2-Perl experts that
would like to look over the examples in my tutorial and provide any
pointers on improving them, I'd be grateful.)

In the Glade section you say that "the callback functions must be within
a package namespace" and you use "package main;" in the examples. 
That's not necessary: if you don't specify otherwise, "main" is
automatically used as the default package.

Hmm.  For some reason I thought I had tried that and it failed.  Well,
if I did I must have messed up or something because it works just fine
now.  Thanks for pointing this out.

In example three you use

  while (Glib::MainContext->default->iteration(FALSE)) {

You use that construct in all examples, but I think the standard way to
process events is

  while (Gtk2->events_pending) {

or, more Perlish:

  Gtk2->main_iteration while (Gtk2->events_pending);

Isn't this method actually obsolete?  My reasons for asking this:

  1) comment #8 of
  2) I tried doing the equivalent of the glib maincontext iteration
     thing in the python version of my examples, but that method
     didn't exist (I assume because it was lagging behind in the
     version of Gtk+ it wrapped) and I was forced to do the
     equivalent of the gtk main_iteration and events_pending for that
  3) [Long winded, sorry] When I was writing the C version of the same
     example program, I was reading the GTK+ FAQ--it had a question
     relevant to what I was trying to do but was missing the answer (it
     had accidentally been edited out, and the question link pointed to
     an obviously unrelated answer).  I found the answer via Google,
     tested it out, then contacted the Gtk+ people to have the answer
     put back in the faq.  The answer I found was basically using the C
     version of the method you suggest.  If I recall correctly, I was
     told that method was deprecated and was told that glib had
     (recently) taken over the main loop.

Other than that, I think the tutorial is cool.  Nice work!

Thanks for taking the time to look over it and comment on it.  :)


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