Re: Gnome::DialogUtil does not work for me



On 02/27/01 Dave Carrigan wrote:
I have the gtk-perl version 0.7005 packages installed on
Debian/unstable, and am having trouble using the Gnome::DialogUtil
class:

 $ perl -e '
    use Gnome;
    Gnome->init("foo");
    $d = Gnome::DialogUtil->error("This is an error");'
 Can't locate object method "error" via package "Gnome::DialogUtil" at -e line 4.

The same problem occurs with Gnome::DNS, Gnome::Geometry, and
Gnome::ICE.  None of these classes have an entry in any of the .defs
files, if that means anything. In addition, the samples/gnome-dns.pl
example doesn't work:

Fixed in cvs, will be in the next release.
If you are in a hurry, you can apply the patch below.

lupus

Index: Makefile.PL
===================================================================
RCS file: /cvs/gnome/gnome-perl/Gnome/Makefile.PL,v
retrieving revision 1.15
diff -u -r1.15 Makefile.PL
--- Makefile.PL 2001/02/26 18:31:06     1.15
+++ Makefile.PL 2001/02/27 22:30:01
@@ -67,6 +67,7 @@
 
 $depend = { 'build/GnomeDefs.c' => 'build/GnomeDefs.h build/PerlGnomeInt.h' };
 
+$gnome->add_boot("Gnome::DialogUtil", "Gnome::DNS", "Gnome::Geometry", "Gnome::ICE");
 $gnome->install (qw(build/GnomeDefs.h build/PerlGnomeInt.h));
 $gnome->write_ext('build/extension.xsh');
 
Index: samples/gnome-dns.pl
===================================================================
RCS file: /cvs/gnome/gnome-perl/Gnome/samples/gnome-dns.pl,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 gnome-dns.pl
--- samples/gnome-dns.pl        1998/12/30 18:43:53     1.1.1.1
+++ samples/gnome-dns.pl        2001/02/27 22:30:01
@@ -19,10 +19,10 @@
 
        print "Starting DNS lookup...\n";
 
-       Gnome::DNS->lookup("www.altavista.digital.com",
+       Gnome::DNS->lookup("www.gnome.org",
                sub {
-                       print "Address of www.altavista.digital.com is $_[1], data is $_[0]\n";
-                       exit;
+                       my $o = Gnome::DialogUtil->ok("Address of www.gnome.org is $_[1], data is $_[0]");
+                       $o->signal_connect("destroy", sub {Gtk->main_quit});
                }, 34);
 });
 
Index: xs/GnomeDNS.xs
===================================================================
RCS file: /cvs/gnome/gnome-perl/Gnome/xs/GnomeDNS.xs,v
retrieving revision 1.2
diff -u -r1.2 GnomeDNS.xs
--- xs/GnomeDNS.xs      1999/10/29 08:29:34     1.2
+++ xs/GnomeDNS.xs      2001/02/27 22:30:02
@@ -7,7 +7,7 @@
 #include "GnomeDefs.h"
 
 
-static void callback(guint32 ip_addr, void * data)
+static void dns_callback(guint32 ip_addr, void * data)
 {
        AV * args = (AV*)data;
     SV * handler = *av_fetch(args, 0, 0);
@@ -47,7 +47,7 @@
        {
                AV * args = newAV();
                PackCallbackST(args, 2);
-               RETVAL = gnome_dns_lookup(hostname, callback, args);
+               RETVAL = gnome_dns_lookup(hostname, dns_callback, args);
        }
        OUTPUT:
        RETVAL
-- 
-----------------------------------------------------------------
lupus debian org                                     debian/rules
lupus ximian com                             Monkeys do it better




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