0

コマンド ボタンにメソッドをアタッチしようとしましたが、次のエラー メッセージが表示されました。procを接続すると正常に動作します。

これを行う方法?

% itcl::class a { 
    method test {} {puts test}
    constructor {} {
        button .t.b -command test; 
        grid config .t.b -column 0 -row 0
    } 
}

% a A

invalid command name "resize"
invalid command name "resize"
    while executing
"resize"
    invoked from within
".t.b invoke"
    ("uplevel" body line 1)
    invoked from within
"uplevel #0 [list $w invoke]"
    (procedure "tk::ButtonUp" line 24)
    invoked from within
"tk::ButtonUp .t.b"
    (command bound to event)
4

2 に答える 2