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

GladeXML doc patch



Hi

I notice the signal_autoconnect_from_package helper method in
GladeXML.pm is not fully documented.  Specifically, the fact it accepts
a package or and object.  I find the latter to be particularly useful
and in fact advocate it as 'the one true way' :-)

So here's a doc patch...

Cheers
Grant
Index: GladeXML.pm
===================================================================
RCS file: /cvsroot/gtk2-perl/gtk2-perl-xs/Glade/GladeXML.pm,v
retrieving revision 1.25
diff -u -r1.25 GladeXML.pm
--- GladeXML.pm	8 Feb 2005 02:25:53 -0000	1.25
+++ GladeXML.pm	14 Apr 2005 09:30:07 -0000
@@ -193,14 +193,20 @@
 The following two convenience methods use this to provide a more
 convenient interface.
 
-=item $gladexml->signal_autoconnect_from_package([PACKAGE])
+=item $gladexml->signal_autoconnect_from_package([PACKAGE or OBJECT])
 
 Sets up the signal handling callbacks as specified in the glade XML data.
-Callbacks will need to have the exact name as specified in the XML data
-and be located in the provided package (or the caller's package if none is
-provided).  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:
+
+The argument to this method can be a Perl package name or an object.  If a
+package name is used, each handler named in the Glade XML data will be called
+as a subroutine in the named package.  If an object is supplied each handler
+will be called as a method of the object.  If no argument is supplied, the name
+of the calling package will be used.  A user data argument cannot be supplied
+however this is seldom necessary when an object is used.
+
+The names of the subroutines or methods must exactly match the handler name in
+the XML data.  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:
 
   sub gtk_main_quit
   {


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