Hi,
I am trying to create a class which is a subclass of MobileNode. The part of
the tcl code I am using is
Class SubMobile -superclass Node/MobileNode
SubMobile instproc init {args} {
... class definitions
}
proc create-submobile-instance { id } {
.......
global SubMobile
.......
set node_($id) [new SubMobile]
}
The problem is when I try to create an instance of this class, I get this
error.
no such object
(_o18 cmd line 1)
invoked from within
"_o18 cmd target {}"
invoked from within
"catch "$self cmd $args" ret"
invoked from within
"if [catch "$self cmd $args" ret] {
set cls [$self info class]
global errorInfo
set savedInfo $errorInfo
error "error when calling class $cls: $args" $..."
(procedure "_o18" line 2)
(SplitObject unknown line 2)
invoked from within
"$rngq_robot_agent target $dmux_"
(procedure "_o15" line 38)
(SubMobile init line 38)
invoked from within
"_o15 init "
(Class create line 1)
invoked from within
"SubMobile create _o15 "
invoked from within
"catch "$className create $o $args" msg"
invoked from within
"if [catch "$className create $o $args" msg] {
if [string match "__FAILED_SHADOW_OBJECT_" $msg] {
delete $o
return ""
}
global errorInfo
error "class $..."
(procedure "new" line 3)
invoked from within
"new SubMobile"
(procedure "create-submobile-instance" line 8)
invoked from within
"create-submobile-instance 1"
(file "run-parms.tcl" line 378)
I believe this is because SubMobile does not have shadow in c++ but I don't
need code in c++ for this class because all this class does is initializing
some variables of the agent attached to this node. Do you have any
suggestions to overcome this problem?
thanks,
gesi