Re: Subclassing a Gtk2::TreeStore
- From: Torsten Schoenfeld <kaffeetisch gmx de>
- To: gtk-perl-list gnome org
- Subject: Re: Subclassing a Gtk2::TreeStore
- Date: Fri, 26 Oct 2007 12:37:14 +0200
On Fri, 2007-10-26 at 17:22 +0100, Dave Howorth wrote:
My [non-working] code looks like this:
I haven't tested it in a complete application, but this seems to work:
package MyTreeStore;
use Glib qw(TRUE FALSE);
use Gtk2;
use Glib::Object::Subclass
'Gtk2::TreeStore',
;
sub drag_data_received
{
my ($self, $dest_path, $selection_data) = @_;
return $self->SUPER::drag_data_received ($dest_path, $selection_data);
}
1;
package main;
my $store = MyTreeStore->new (qw/Glib::String/);
$store->drag_data_received (undef, undef);
Note how drag_data_received is overridden simply how you'd override any
other method in normal Perl code, and how the parent's
drag_data_received is invoked.
--
Bye,
-Torsten
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]