in reply to Re^5: Shift returning pointer
in thread Shift returning pointer
Sorry, the whole program is 1000+ lines. I'll try to be more clear. I have two tree views, and I want a person to be able to select an element from one, press a button, and have that element to be added the second treeview on the right. Below are the declarations for both lists, The first is $Envs, the second is $EnvsToRun. Also, where I fill the first list, get the element that I want to put into the second list, and where I add the element to the second list. $duration and $config are variables that I am not having problems with.
$Envs = Gtk2::Ex::Simple::List->new_from_treeview ( $abaNewWindow->get +_widget('Envs'), 'Environments' => 'text'); $EnvsToRun = Gtk2::Ex::Simple::List->new_from_treeview ( $abaNewWindow +->get_widget('EnvsToRun'), 'Environments' => 'text', 'Duration' => 'd +ouble', 'Config' => 'int'); open(ENVIRONMENTS, "environments.txt"); while(<ENVIRONMENTS>){ my $line = $_; chomp($line); push @{$Envs->{data}}, $line; } close(ENVIRONMENTS); $environment = shift @{$Envs->{data}}; print $environment; push @{$EnvsToRun->{data}}, [$environment, $duration, $config];
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: Shift returning pointer
by bellaire (Hermit) on Mar 16, 2009 at 19:35 UTC | |
by rgb96 (Acolyte) on Mar 16, 2009 at 19:40 UTC | |
by bellaire (Hermit) on Mar 16, 2009 at 19:51 UTC | |
by rgb96 (Acolyte) on Mar 16, 2009 at 20:34 UTC |