Problems with data returned from Gtk2::SimpleList
- From: "Roderich Schupp (ext)" <Roderich Schupp ext BenQ com>
- To: "Ratcliffe, Jeffrey (Peters)" <Jeffrey Ratcliffe External eads com>, <gtk-perl-list gnome org>
- Subject: Problems with data returned from Gtk2::SimpleList
- Date: Thu, 3 Aug 2006 15:50:49 +0200
[ new subject, since this has nothing to do with the original thread ]
Subject: RE: capturing output from running process crashes gtk2
How do I write
my $filename = $list -> {data}[$page[0]][0];
$image = Gtk2::Image -> new_from_file ($filename);
on one line?
$image = Gtk2::Image -> new_from_file ($list ->
{data}[$page[0]][0]);
doesn't work.
I'm guessing $list here is a Gtk2::SimpleList?
I can confirm this behaviour: $list->{data}[0][0] correctly
contains the expected value in row 0 and column 0
(assuming column 0 is of type "text"),
but when it is directly fed into Gtk2::Image->new_from_file
nothing is shown in the returned image (not even the "broken image"
logo).
Now Gtk2::Image->new_from_file is apparently just an XS wrapper
for gtk_image_new_from_file... Looking at $list->{data}[0][0]
with Devel::Peek I can see it contains some heavy magic
(it's actually an lvalue), maybe it isn't correctly
converted down to a simple string when passed from
Perl to C level?
Cheers, Roderich
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]