Re: Gtk2::Plug -- connect?



-- muppet <scott asofyet org> wrote
(on Thursday, 31 July 2003, 12:14 PM -0400):

On Thursday, July 31, 2003, at 11:34  AM, Matthew Weier OPhinney wrote:

How do I connect to a GtkSocket, using gtk2-perl 0.90?

it's easier than you were making it.  :-)

either:

   1. create the Gtk2::Socket
   2. pass the output of $socket->get_id to the other process
   3. in the other process, do $plug = Gtk2::Plug->new ($socket_id)
   # this is the method used by examples/plug.pl and examples/socket.pl,
   # and explained in the description section of
   # http://developer.gnome.org/doc/API/2.0/gtk/GtkSocket.html

Okay, that was my inclination, and, on looking at the python I was
basing my code on, that's what was *supposed* to happen, anyways. What
confused the issue was that author's using 'plug.socket' to connect to a
GDK window object (I feel he should have used a different name for the
object than 'socket'!).

So, I've made the requisite changes, and can connect now. However, I
have a new problem. Via many abstractions, a Gtk2::Plug is a
Gtk2::Window, and as such should have a 'connect' method (to connect to
signals). So, the following *should* work, right? 

    $plug->connect('destroy', <ref to some method/sub>);

But it doesn't. Should the method be 'signal_connect' instead? 

-- 
Matthew Weier O'Phinney
http://weierophinney.net/matthew/



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