Re: Strange CList problem
- From: Christoph Lorenz <Christoph_Lorenz gmx de>
- Cc: gtk-perl-list gnome org
- Subject: Re: Strange CList problem
- Date: 16 Jan 2002 19:34:38 +0100
Am Don, 2002-01-10 um 18.13 schrieb John McDermott:
It looks as though you've created a closure (which keeps the context of
the sub call). Make the call to Edit_MP3_Tag a ref (put a \ in front of
the &) and that should fix it.
Hi John, hi all,
in the meantime, I've fixed the problem, and to be honest - I'm now more
puzzled than before:
Is there any specific reason, why list->get_row_data($row) gives me
different(!) values than $list->get_text($row,0) etc. ?
Could it be the case, that $list->get_row_data stays constant with its
initial values all over the lifetime of a list, while $list->get_text()
gives you the current values?
Ciao
Christoph
--john
In my application, I'm using a CList, which is filled with several
columns. There's also a "modify" button, which is coded the following
way:
$list->signal_connect(
"select_row", sub {
my ( $clist, $row, $column, $mouse_event ) = @_;
return unless $mouse_event->{type} eq "2button_press";
&Edit_MP3_Tag($app,$mmusic,$row,$clist);
}
);
The subrouting Edit_MP3_Tag should change one or more columns of the
selected row. In that subroutine, the column is updated the following
way:
$list->freeze();
$list->set_text($row,1,$song_id);
...
$list->set_foreground( $row, $color);
$list->thaw();
Everything works perfect at first sight. In the Edit_MP3_Tag subroutine
I can change the contents of the list and the changes are all displayed.
Perfect.
But now, when I modify a row, which I modified before, I do get in
Edit_MP3_Tag all the *former* contents of that row. And those contents
are different from what was displayed....
Has anybody got a clue, what's going one here?
--
John McDermott, Writer and Consultant
J-K International, Ltd.
V +1 505/377-6293 F +1 505/377-6313
jjm jkintl com
_______________________________________________
gtk-perl-list mailing list
gtk-perl-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-perl-list
--
Christoph Lorenz *** http://ChLorenz.home.pages.de/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]