クラスのメンバー メソッド内で現在のオブジェクトを参照することは可能ですか。以下のコードをご検討ください。
itcl::class widget {
private variable inst
method ChildCount {} {
return [llength [keylkeys inst children]]
}
method AddChild {childWidget} {
inst children.[ChildCount] $childWidget
# ***HOW TO GET THIS WORKING?***
$childWidget SetParent $self
}
}
$self
inに相当するものは何$childWidget SetParent $self
ですか?