(Continued from previous email)

sub Gtk3::ListStore::insert_with_values {
  my ($model, $position, @columns_and_values) = @_;
  my ($columns, $values) = _unpack_keys_and_values (\@columns_and_values);
  if (not defined $columns) {
    croak ("Usage: Gtk3::ListStore::insert_with_values (\$model,
\$position, \\\@columns, \\\@values)\n",
           " -or-: Gtk3::ListStore::insert_with_values (\$model,
\$position, \$column1 => \$value1, ...)");
  }
  my @wrapped_values = ();
  foreach my $i (0..$#{$columns}) {
    my $column_type = $model->get_column_type ($columns->[$i]);
    print "type: $column_type\n";
    push @wrapped_values,
         Glib::Object::Introspection::GValueWrapper->new (
           $column_type, $values->[$i]);
  }
  return Glib::Object::Introspection->invoke (
    $_GTK_BASENAME, 'ListStore', 'insert_with_valuesv', # FIXME: missing
rename-to annotation?
    $model, $position, $columns, \@wrapped_values);
}

I was able to trace that error (which for some reason only partially
prints?) to the GValueWrapper invocation which should be: ccroak ("Could
not find GType for '%s'", type_package);

We find that the $column_type is producing "Glib::" when amatch is used,
however, if it's commented out, we produce "Glib::String" and everything
just works fine.

I bring up this interesting test case because I've seen this *exact* odd
behavior in a few other completely unrelated instances now. For example, I
forgot to lock a shared (threaded) variable, and the next time *anywhere*
in the program (completely unrelated to the variable in question) I
inserted or modified an iter, this behavior appeared.

Luckily, the short test case in the previous email demonstrates the issue
quite without anything too fancy. I've tried using the latest 3.10 GTK +
0.011 Gtk3.pm stock to no avail.

Thoughts would be appreciated.. =)

*Terence J. Ferraro
CTO, Bio-Tech Medical Software Inc.
800-797-4711 Ext 116
*


On Mon, Sep 23, 2013 at 7:13 PM, Terence Ferraro
<terencejferr...@gmail.com>wrote:

> This script here:
>
> use Gtk3 -init;
> require String::Approx; String::Approx->import qw(amatch);
> my $foo = String::Approx::amatch("foobar", ["3 i"], "foobor");
> my $store = Gtk3::ListStore->new(qw/Glib::String/);
> $store->insert_with_values(0,0,'0');
> $store->insert_with_values(1,0,'1');
>
> Produces this:
> "Could  at testgtk.pl line 5."
>
> Some digging:
>
>
_______________________________________________
gtk-perl-list mailing list
gtk-perl-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-perl-list

Reply via email to