Re: problem with $liststore->set
- From: Jens Luedicke <jens luedicke gmail com>
- To: Gtk-Perl-List <gtk-perl-list gnome org>
- Subject: Re: problem with $liststore->set
- Date: Wed, 20 Jul 2005 23:26:24 +0200
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Torsten Schoenfeld wrote:
No, it isn't. And there shouldn't really be any difference. What
exactly were the warnings? What does $stuff->return_value return? Is
the problem reproducible? Are you sure that nothing else is causing the
warnings?
the given code example wasn't everything. I just reduced it to the
suspected problem.
The current code (which fails) can be found here:
http://svn.foo-projects.org/listing.php?repname=filer&path=%2Ftrunk%2F&rev=0&sc=0#/trunk/
code snippets:
Filer.pm:
if (rename($old,$new)) {
$self->{active_pane}->set_item(new Filer::FileInfo($new));
$new is a path to a file or directory.
FilePane.pm:
sub set_item {
my ($self,$fi) = @_;
$self->[SELECTED_ITEM] = $fi->get_path;
$self->[TREEMODEL]->set($self->[SELECTED_ITER],
COL_NAME, $fi->get_basename,
COL_SIZE, $fi->get_size,
COL_MODE, $fi->get_mode, <==== failed here
COL_TYPE, $fi->get_mimetype,
COL_DATE, $fi->get_mtime,
COL_FILEINFO, $fi
);
}
Filer/FileInfo.pm
sub get_mode {
my ($self) = @_;
return format_mode($self->get_raw_mode);
}
format_mode from Stat::lsMode
Jens
- --
Jens Luedicke
web: http://perldude.de
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFC3sGAiCvkc4H0gTERAkKwAKD9C9Fxx+YocgEXAM2SzK/SITtuzQCg0geh
YfV+4BKDBqaanVESM3aLlGc=
=JOIS
-----END PGP SIGNATURE-----
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]