with tclpd 0.3 I finally fixed typemaps support.
there are some conversions that take place automatically, when calling
pd C functions from tcl, namely: for arguments t_symbol*, t_atom* (one
atom), and for (int argc, t_atom *argv) (a list of atoms).
t_symbol* maps directly to tcl strings and vice versa.
t_atom* maps to {selector value} (e.g. {float 1} or {symbol foo})
and similarily (int argc,t_atom* argv) maps to atom lists, like {{float
1} {float 2} {float 3} {symbol foo}}
in addition, $self is cast automatically to t_tcl*, t_text*, t_pd*,
t_object* when needed.
so, calling the pd api should now be straightforward.
those changes are reflected in tclpd.tcl and in the examples.
there are still bugs unfixed:
- get_binbuf problem (binbuf actually not available, needs fix)
- slider2.tcl remains somewhat broken because I haven't had time to fix
- bitmap's help (makes pd crash only if opened via context menu Help)
- problem with namespace prefixes (e.g. [dir/classname])
@hc: note for tclfile externals, now you need to apply such changes:
- set dir [[canvas_getdir $current_canvas] cget -s_name]
+ set dir [canvas_getdir $current_canvas]
and similar. (also, update package requires with TclpdLib 0.20 and Tclpd
0.3.0)