On Tue, 8 Apr 1997, Laurent Pasquer wrote:
> Hello, I've got a problem with VTCL (even with 1.09B) :
>
> - I have one menu, with 3 entries inside, each one has a command.
> I double-click on the first, so the �command-box� appears, and if
> I do not close it (by cancel), when I double-click on another entry,
> its command disapear ! (the command-box inside is not modified, and if
> I click OK, I have got an error !).
oops. To fix this, edit lib/lib_core.tcl and look for the
procedure "vTcl:menu_item_get_cmd". Change the first five
lines to:
proc vTcl:menu_item_get_cmd {target num} {
global vTcl
set base ".vTcl.com_[vTcl:rename $target]_$num"
set cmd [$target entrycget $num -command]
set lbl [$target entrycget $num -label]
set r [vTcl:get_command "Command for $lbl ($target)" $cmd $base]
here's the context diff:
diff -c -r1.3 lib_core.tcl
*** lib_core.tcl 1997/04/08 03:17:50 1.3
--- lib_core.tcl 1997/04/09 03:42:14
***************
*** 303,311 ****
proc vTcl:menu_item_get_cmd {target num} {
global vTcl
! set base ".vTcl.com_[vTcl:rename $target]"
set cmd [$target entrycget $num -command]
! set r [vTcl:get_command "Command for $target" $cmd $base]
if {$r == -1} {
return
} else {
--- 303,312 ----
proc vTcl:menu_item_get_cmd {target num} {
global vTcl
! set base ".vTcl.com_[vTcl:rename $target]_$num"
set cmd [$target entrycget $num -command]
! set lbl [$target entrycget $num -label]
! set r [vTcl:get_command "Command for $lbl ($target)" $cmd $base]
if {$r == -1} {
return
} else {
-stewart-