dlal66 has asked for the wisdom of the Perl Monks concerning the following question:
and I simply do not understand the constructif ($type eq 'bitmap') { my $bg = ($c->itemconfigure(qw/current -background/))[4]; if (defined $bg) { $iinfo->{restore_cmd} = "\$c->itemconfigure('current', -background => '$bg');"; } else { $iinfo->{restore_cmd} = "\$c->itemconfigure('current', -background => undef);"; } $c->itemconfigure(qw/current -background SteelBlue2/); return; }
What is 4?? I thought itemconfigure was used to set a property but seemingly it is being used here to retrieve a value? Thanks for the wisdommy $bg = ($c->itemconfigure(qw/current -background/))[4];
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Strange construct
by davido (Cardinal) on Sep 07, 2011 at 19:38 UTC | |
|
Re: Strange construct
by halley (Prior) on Sep 07, 2011 at 19:46 UTC | |
by AnomalousMonk (Archbishop) on Sep 07, 2011 at 20:05 UTC | |
|
Re: Strange construct
by ikegami (Patriarch) on Sep 07, 2011 at 20:24 UTC | |
by dlal66 (Acolyte) on Sep 07, 2011 at 21:14 UTC | |
|
Re: Strange construct
by kcott (Archbishop) on Sep 08, 2011 at 05:31 UTC |