home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!stanford.edu!rutgers!ucla-cs!oahu.cs.ucla.edu!andylee
- From: andylee@oahu.cs.ucla.edu (Andy Lee)
- Newsgroups: comp.lang.tcl
- Subject: (Possible) Bug in Tk2.3 Menubutton
- Message-ID: <1992Sep4.182321.24039@cs.ucla.edu>
- Date: 4 Sep 92 18:23:21 GMT
- Sender: usenet@cs.ucla.edu (Mr Usenet)
- Organization: UCLA, Computer Science Department
- Lines: 31
- Nntp-Posting-Host: oahu.cs.ucla.edu
-
- [This is the third attempt in posting this, I hope it finally gets through...]
-
- When I click on a menubutton whose menu is empty, as demonstrated in
- the following wish script below:
-
- #!/usr/local/bin/wish -f
- pack append . [menubutton .testbutton -text Test -menu .testmenu] top
- menu .testmenu
-
- Tk2.3 complains with the error message:
-
- bad menu entry index "0"
- while executing
- "[lindex [$tk_priv(posted) config -menu] 4] activate 0"
- ("then" clause line 2)
- invoked from within
- "if {($tk_priv(inMenuButton) != "") && ($tk_priv(posted) != "")} {
- [lindex [$tk_priv(posted) config -menu] 4] activate 0
- } else {
- tk_mbUnpost
- ..."
- (command bound to event)
-
- This used to work (in Tk2.1) where an empty menu is posted, but no
- error message. Am I doing something wrong?
-
- --
- Andy A. Lee UCLA MS Graduate Student, AI Neural Networks
- andylee@cs.ucla.edu Down-to-Earth Idealist & Independent NeXT Developer
- (310)824-7131 "If you don't watch your figure, who will?" - TV Ad.
- (310)208-0200 "Trust is earned, not given away." - Star Trek: TNG
-