rows-reordered class closure args
- From: Kevin Ryde <user42 zip com au>
- To: gtk-perl-list gnome org
- Subject: rows-reordered class closure args
- Date: Fri, 25 Jul 2008 10:27:02 +1000
In a subclass of something implementing Gtk2::TreeModel it looks like
the class closure for rows-reordered misses out on the marshaller
turning the gint* array into a perl array. Eg. the program below prints
reordered class closure:
$VAR1 = [
bless( {}, 'MyStore' ),
bless( do{\(my $o = 156748176)}, 'Gtk2::TreePath' ),
undef,
156950536
];
package MyStore;
use strict;
use warnings;
use Gtk2;
use Data::Dumper;
use Glib::Object::Subclass
'Gtk2::ListStore',
signals => { rows_reordered => \&my_rows_reordered };
sub my_rows_reordered {
print "reordered class closure:\n";
print Dumper(\ _);
}
package main;
use Gtk2 '-init';
my $store = MyStore->new;
$store->set_column_types ('Glib::String');
$store->set ($store->append, 0=>'one');
$store->set ($store->append, 0=>'two');
$store->rows_reordered (Gtk2::TreePath->new, undef,
1, 0);
exit 0;
--- GtkTreeModel.xs 07 Jul 2008 09:53:48 +1000 1.54
+++ GtkTreeModel.xs 25 Jul 2008 10:25:58 +1000
@@ -629,6 +629,18 @@
=cut
+=for position post_signals
+
+Note that currently in a Perl subclass of an object implementing
+C<Gtk2::TreeModel>, the class closure, ie. class default signal
+handler, for the C<rows-reordered> signal is called only with an
+integer address for the reorder array parameter, not a Perl arrayref
+like a handler installed with C<signal_connect> receives. It works to
+C<signal_chain_from_overridden> with the address, but it's otherwise
+fairly useless and will likely change in the future.
+
+=cut
+
=for apidoc __hide__
=cut
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]