A itcl question for variable
From: guan sy (guan.shangyuan51_at_zte.com.cn)
Date: 11/28/03
- Next message: David Gravereaux: "Re: How to integrate tcl with VC++"
- Previous message: Dr. Detlef Groth: "Re: wrapping application that uses .dll's"
- Next in thread: Michael Barth: "Re: A itcl question for variable"
- Reply: Michael Barth: "Re: A itcl question for variable"
- Reply: Gustaf Neumann: "Re: A itcl question for variable"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 28 Nov 2003 00:44:42 -0800
hello:
I use itcl to program a class. But when i run it , the tcl
interpretor shows some problems. The following is my exmaple. if you
know, please tell me what to notice especially.
file cat.ith:
class cat {
public {
method Constructor {type args} {}
method Destructor {} {}
method GetType {}
method GetOther {}
}
private {
variable cattype
variable attributes
}
}
file cat.itb
body cat::Constructor {type args} {
set cattype $type
set attributes $args
}
body cat::GetType {} {
return $cattype
}
body cat::GetOther {} {
return $attributes
}
file: mytest.tcl
...
cat x italycat white 20
set type [x GetType]
run it : no such variable $cattype
- Next message: David Gravereaux: "Re: How to integrate tcl with VC++"
- Previous message: Dr. Detlef Groth: "Re: wrapping application that uses .dll's"
- Next in thread: Michael Barth: "Re: A itcl question for variable"
- Reply: Michael Barth: "Re: A itcl question for variable"
- Reply: Gustaf Neumann: "Re: A itcl question for variable"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]