Re: problem with $liststore->set

* Jens Luedicke <jens luedicke gmail com> [2005-07-20 20:40]:
is it a known problem that something like this

$liststore->set($iter, 0, $stuff->return_value);

behaves differently than

$val = $stuff->return_value;
$liststore->set($iter, 0, $val);


That canât make any difference, unless Gtk2::ListStore->set wants
to modify $val and $stuff->return_value returns a constant or
literal. Other than this, there is no way for ->set to tell a
difference. The order of evaluation is the same in both cases.

This looks like something else in your code was acting up, you
changed this piece of the code, then it happened to stop acting
up, and you attributed that to the change.

Please try to reduce your code to a minimal example that still
exhibits the problem, reproducibly, and post that. Iâm pretty
sure that in the course of doing so youâll find the problem was
somewhere else entirely.

*AUTOLOAD=*_=sub{s/(.*)::(.*)/print$2,(",$\/"," ")[defined wantarray]/e;$1};

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]