Re: Gt2k::GladeXML examples missing from install package?



On Wed, 2004-11-17 at 03:20, Jason Stirling wrote:
I guess what I am trying to say is this section didn't make it clear to me (as a newbie) that the 
gtk_main_quit signal must be bound (if that's the right terminology) somewhere, either in your code or in 
glade.  To me, that sub doesn't define a call-back.

Perhaps the example should look something like this:

      It is worth noting that callbacks you get for free in c such
      as gtk_main_quit will not exist in perl and must always be
      defined, for example:

            $some_window->signal_connect( delete_event => gtk_main_quit );
 
              sub gtk_main_quit
              {
                    Gtk2->main_quit;
              }

with the addition of the \&:
$some_window->signal_connect( delete_event => \&gtk_main_quit );
that would work, but it's not using the glade facilities the other is
talking about. in glade you can specify signal handlers to be connected
for you, they are function names. (gtk_main_quit,
handle_click_on_button, etc.) you then create functions with those names
and then $gladexml->signal_autoconnect_from_package('main') will connect
the handlers you defined in glade to the functions with the same name in
main. there's a GladeXML tutorial around somewhere that should tell you
what you're needing to know. i can't find it at the moment. anyone got a
url?

-- 
-rm
http://www.neces.com/




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