I am strugling with argument lists that contain lists and what happens with
uplevel and {*}$args. The lists are getting flattened. How can I preserve
the sub-lists? There has got to be way of doing this, but I am failing to
manage it.
uplevel #0 $options(-callback) PLANETARY_ORBIT [from arglist -epoch] \
"[from arglist -position]" "[from arglist -velocity]"
Then in the callback proc:
method _clientCallback {cmd epoch args} {
switch $cmd {
...
PLANETARY_ORBIT {
$self setposval {*}$args
}
...
}
}
method setposval {pos vel} {
..
}
The -position and -velocity options in the original arglist are lists of three
numbers, that eventually end up at pos and vel in setposval, but setposval is
getting 6 arguments instead. Somewhere between uplevel, the args argument to
_clientCallback and the use of {*}$args (and yes, this is all happening inside
of SNIT types). Oh, I am using Tcl 8.6.11
--
Robert Heller -- Cell:
413-658-7953 GV:
978-633-5364
Deepwoods Software -- Custom Software Services
http://www.deepsoft.com/ -- Linux Administration Services
hel...@deepsoft.com -- Webhosting Services