home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / lang / tcl / 1308 < prev    next >
Encoding:
Internet Message Format  |  1992-09-03  |  1.5 KB

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