Re: [tkined] ..invalid command "tk_menuSetFocus(...

Buz Owen (ado@bbn.com)
Mon, 23 Mar 1998 15:48:38 -0500

> Hello,
>
> I have exactly this same problem, and I looked in my tk8.0 menu.tcl file to change
> it as indicated,
> but being unfamiliar with the tcl langage I don't exactly know what to change
> or what your "Just take out the parens, and replace the open paren with a space.
> /b" means.
> I would be very greatfull if you could be a little more specific what I need to
> change where in this file.
>
> Thanks in advance and kind regards.
> Benny
>
> Buz Owen wrote:
>
> > > Whenever I try to right click on the objects I get: "Error: invalid
> > > command name "tk_menuSetFocus(.tkined0.canvas.popup)" with the option to
> > > OK, Skip Messages and Strack Trace. I tried to Stack Trace but my
> > > knowledge of tcl/tk is very limited. It is most anoying because at times
> > > I cannot access the attributes of the objects on the canvas.
> >
> > This is a bug in the tk8.0 release. One fix is to get tcl/tk8.1. Another is
> > just to edit the installed version of the file menu.tcl - in directory $prefix/
> > lib/tk8.0/, which contains the offending line. Just take out the parens, and
> > replace the open paren with a space. /b

The file menu.tcl in the lib/tk8.0 directory needs to be changed. Here's a
diff
of the patched file and the original in the 8.0 release:

diff -b menu.tcl menu.tcl.orig
1190c1190
< tk_menuSetFocus $menu

---
>       tk_menuSetFocus($menu);

The file menu.tcl is located, by default, in /usr/local/lib/tk8.0, but might be somewhere else on your system - look for a "lib" directory in the same directory as the "bin" directory containing "tclsh8.0".

In the message quoted above, I suggested getting "tcl8.1" - this was a typo on my part, you can, and probably should, get tcl8.01, a maintenance release, which fixes the above and other small problems in tcl8.0. Tcl8.1 is still in prerelease, as far as I know.

hope this helps/buz (sometimes "/b").

--
!! This message is brought to you via the `tkined & scotty' mailing list.
!! Please do not reply to this message to unsubscribe. To subscribe or
!! unsubscribe, send a mail message to <tkined-request@ibr.cs.tu-bs.de>.
!! See http://wwwsnmp.cs.utwente.nl/~schoenw/scotty/ for more information.