Cut and paste on HList::Tree
by Pat R other posts by this author
Mar 30 2007 8:39AM messages near this date
Uninstall Perl/Tk 804.027 to install Perl/Tk 800.015
|
Re: Cut and paste on HList::Tree
SOURCE Hi,
I'm trying to implement cut and paste functionality on a Tree widget, basically when the u
ser selects one entry and right-click a menu shows up with the options Cut, Copy, Paste befo
re, Paste after. Cut and copy work fine, paste works when the new entry is inserted at the e
nd of the tree but the program crashes when I use options -at, -before and -after.
Any help will be greatly appreciated.
Thanks
Patricia
This is the part of my script that crashes
$menu = $db-> Menu( -tearoff => 0,
-menuitems => [
['command'=> 'Paste Before',
-command => sub{ print "Paste
Before \n";
$parent = $tests_list-> infoPa
rent($index[0]);
# This works $tests_list-> addchild($parent, -text => $item_sel
);
# Next 2 crash
$tests_list-> add($parent,-before =>$index[0], -text =
> $item_sel);
$tests_list-> add($parent,-at=>1, text=>$item_sel
}],
---------------------------------
Don't be flakey. Get Yahoo! Mail for Mobile and
always stay connected to friends.
Thread:
Pat R
Marc Dashevsky
Slaven Rezic
|