RE: GTK Drag and Drop object reference in Perl


Thanks for the advice - i managed to get it working in the end.

Just in case someone else wants to get something similar working tho, a
small correction:

The line:
  $number = $widget->get_pointer;

Should read:
  $number = $widget->_return_pointer;

Thanks again

-----Original Message-----
From: muppet [mailto:scott asofyet org]
Sent: Tuesday, January 07, 2003 3:18 AM
To: rwilding
Subject: Re: GTK Drag and Drop object reference in Perl

rwilding wrote:

I currently have a workaround which uses a global variable but I really
to avoid this if at all possible.  As I said, i've searched loads of forums
and the closest I found was a code fragment in c++ which passed a pointer
a data structure so I assume it can be done in c++, this suggests this
be a problem with the bindings???

Thanks, any ideas would be appreciated!

i haven't tried any of this before, but if you're really stuck:

    $number = $widget->get_pointer;
    $widget = Gtk::Widget->new_from_pointer ( $number );

of course you have to make sure the widget stays alive while you have 
the pointer to it (ref counts, object lifetime yadda yadda yadda).

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