2012-03-22 97 views
0

我是TK新手,我认为我得到的错误信息是TK。以下是错误消息:TCL/TK错误消息没有帮助。有些人可以帮助我,请

unknown option "-state"; must be one of -background, -bd, -bg, -borderwidth, -columnbd, -columnborderwidth, -columnrelief, -cursor, -exportselection, -fg, -fillcolumn, -font, -foreground, -height, -highlightbackground, -highlightcolor, -highlightthickness, -labelanchor, -labelbackground, -labelbd, -labelbg, -labelborderwidth, -labelfg, -labelfont, -labelforeground, -labelheight, -labelimage, -labelrelief, -labels, -relief, -resizablecolumns, -selectbackground, -selectborderwidth, -selectcommand, -selectforeground, -selectmode, -setgrid, -takefocus, -width, -xscrollcommand or -yscrollcommand

errorInfo中跟踪:

unknown option "-state"; must be one of -background, -bd, -bg, -borderwidth, -columnbd, -columnborderwidth, -columnrelief, -cursor, -exportselection, -fg, -fillcolumn, -font, -foreground, -height, -highlightbackground, -highlightcolor, -highlightthickness, -labelanchor, -labelbackground, -labelbd, -labelbg, -labelborderwidth, -labelfg, -labelfont, -labelforeground, -labelheight, -labelimage, -labelrelief, -labels, -relief, -resizablecolumns, -selectbackground, -selectborderwidth, -selectcommand, -selectforeground, -selectmode, -setgrid, -takefocus, -width, -xscrollcommand or -yscrollcommand 
    while executing 
"::mclistbox::Canonize $w option [lindex $args 0]" 
    (procedure "::mclistbox::WidgetProc" line 211) 
    invoked from within 
"::mclistbox::WidgetProc .autoQuote.reportInfoTab.f.tit76.f.mcl84 cget -state" 
    ("eval" body line 1) 
    invoked from within 
"eval ::mclistbox::WidgetProc {.autoQuote.reportInfoTab.f.tit76.f.mcl84} $command $args" 
    (procedure ".autoQuote.reportInfoTab.f.tit76.f.mcl84" line 1) 
    invoked from within 
"$w cget -state" 
    (procedure "tk::ListboxBeginSelect" line 18) 
    invoked from within 
"tk::ListboxBeginSelect [::mclistbox::convert .autoQuote.reportInfoTab.f.tit76.f.mcl84.framecol1.listbox -W] [[::mclistbox::convert .autoQuote.reportIn..." 
    invoked from within 
"if {[winfo exists [::mclistbox::convert .autoQuote.reportInfoTab.f.tit76.f.mcl84.framecol1.listbox -W]]} { 
    tk::ListboxBeginSelect [::mclistbox::conve..." 
    (command bound to event) 

这不是我的代码,但它看起来像它会在部件库。我找到了例程'widgetProc',它似乎有一个'状态'开关。我现在只是画一片空白。

这里是我的环境:

  • Windows 7企业版SP1。
  • TCL版本:8.5.11.1
  • bwidgets 1.95
  • 的iWidget 4.0.1
  • tcllib 1.14

回答

0

的错误不是由widgetProc引起的,而是由:: mclistbox :: Canonize。不幸的是,我并不熟悉它,但Google搜索快速显示this的结果与解析度相似。然而,发布日期会让我乐观地提出,如果可能的话,您可以升级到更新的版本。如果这是不可能的,也许你可以告诉我们你正在使用的代码 - 也许有可能你调用它的方式触发了错误。

+1

来源mclistbox是在http://tcllib.cvs.sourceforge.net/viewvc/tcllib/mclistbox/mclistbox.tcl?revision=1.34&view=markup – 2012-03-23 15:45:39

+0

而且,据我所见,应该有一个' -state'选项。嗯。 – 2012-03-23 15:50:22

+0

@DonalFellows谢谢!看起来OP还没有回来,所以这个谜还会持续一段时间。 :-) – TrojanName 2012-03-23 17:08:27

0

我找到了一个快速的解决方法。不知道它是否完全正确,但它对我有效。 加入线下77(应为“阵列组widgetOptions [列表\”)

-state  {State   State} \ 

将提供一个diff以下,但它是这样一个简单的修复,我不认为它值得它。