TCL/TK错误消息不';我帮不上忙。请给我一些帮助好吗

TCL/TK错误消息不';我帮不上忙。请给我一些帮助好吗,tcl,tk,Tcl,Tk,我是TK新手,我想我得到的错误信息是TK。以下是错误消息: 未知选项“-state”;必须是-background、-bd、-bg、-borderwidth、-columnbd、-columnborderwidth、-columnrelief、-cursor、-exportselection、-fg、-fillcolumn、-font、-front、-height、-highlightbackground、-labelanchor、-labelbg、-labelborderwidth、-labe

我是TK新手,我想我得到的错误信息是TK。以下是错误消息:

未知选项“-state”;必须是-background、-bd、-bg、-borderwidth、-columnbd、-columnborderwidth、-columnrelief、-cursor、-exportselection、-fg、-fillcolumn、-font、-front、-height、-highlightbackground、-labelanchor、-labelbg、-labelborderwidth、-labelfg、-labelfont、-labelforeground、,-labelheight、-labelimage、-labelrelief、-labels、-relief、-ResizebleColumns、-selectbackground、-selectborderwidth、-selectcommand、-selectforeground、-selectmode、-setgrid、-takefocus、-width、-xscrollcommand或-yscrollcommand

错误信息跟踪:

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”,它似乎有一个“-state”开关。我现在只是画一张空白

这是我的环境:

  • Windows7企业版SP1
  • tcl版本:8.5.11.1
  • bwidgets 1.95
  • iwidgets 4.0.1
  • tcllib 1.14

    • 该错误不是由widgetProc引起的,而是由引起的::mclistbox::Canonize。现在不幸的是,我不熟悉它,但快速的谷歌搜索结果显示类似的缺乏分辨率。然而,帖子上的日期会让我提出一个乐观的建议,如果可能的话,你可以升级到更新的版本。如果这是不可能的,也许你可以向我们展示你正在使用的代码——也许你调用它的方式触发了错误。

      我找到了一个快速的解决方法。不确定这是否完全正确,但它对我起了作用。 在第77行下添加以下内容(应为“数组集widgetOptions[list\”)


      将提供一个差异,但这是一个如此简单的修复,我觉得它不值得。

      mclistbox的源代码也在,据我所知,应该有一个
      -state
      选项。嗯。@DonalFellows谢谢!看起来操作还没有返回,所以这个谜将继续一段时间。:-)
      -state       {State           State} \