Re: 'Cannot convert arbitrary SV to GValue' when setting child property of GtkStack
- From: Daniel Kasak <d j kasak dk gmail com>
- To: GTK-Perl List <gtk-perl-list gnome org>
- Subject: Re: 'Cannot convert arbitrary SV to GValue' when setting child property of GtkStack
- Date: Wed, 10 Aug 2016 21:40:50 +1000
That's it :) Thanks Torsten.
Dan
On Tue, Aug 9, 2016 at 5:53 PM, "Torsten Schönfeld" <kaffeetisch gmx de> wrote:
"Daniel Kasak" <d j kasak dk gmail com>:
I'm trying to set the 'needs-attention' property of a GtkStack's child page.
When I go:
use Glib qw( TRUE FALSE );
my $needs_attention = FALSE;
if ( $self->{ 'Column' . $i . 'Datasheet' }->count ) {
$needs_attention = TRUE;
}
my $child = $self->{stack}->get_child_by_name( 'page' . $i );
$self->{stack}->child_set_property(
$child
, 'needs-attention'
, $needs_attention
);
... I get:
Cannot convert arbitrary SV to GValue'
Looks like the Gtk3::Container::child_set* and child_get* methods need overrides. Fow now,
child_set_property expects a GValue, so as a workaround, try something like this:
my $gvalue = Glib::Object::Introspection::GValueWrapper->new (
'Glib::Boolean', $needs_attention);
$self->{stack}->child_set_property ($child, 'needs-attention', $gvalue);
_______________________________________________
gtk-perl-list mailing list
gtk-perl-list gnome org
https://mail.gnome.org/mailman/listinfo/gtk-perl-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]