diff options
author | mescalinum <mescalinum@users.sourceforge.net> | 2011-11-15 07:49:20 +0000 |
---|---|---|
committer | mescalinum <mescalinum@users.sourceforge.net> | 2011-11-15 07:49:20 +0000 |
commit | 27992fb1ac4b86097a3fefa3b13f4d150a44aa03 (patch) | |
tree | 266556307f9b0ec29219ad42578600a9bbd279a9 /tcl_class.c | |
parent | 1cfa4de1d848808738c9123a85764cd23f7b61d5 (diff) |
fixed bug 3436716
svn path=/trunk/externals/loaders/tclpd/; revision=15748
Diffstat (limited to 'tcl_class.c')
-rw-r--r-- | tcl_class.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/tcl_class.c b/tcl_class.c index 46870e8..fc4136d 100644 --- a/tcl_class.c +++ b/tcl_class.c @@ -94,10 +94,25 @@ t_tcl * tclpd_new(t_symbol *classsym, int ac, t_atom *at) { // lookup in class table const char *name = classsym->s_name; t_class *qlass = class_table_get(name); + while(!qlass) { + // try progressively skipping namespace/ prefixes (bug 3436716) + name = strchr(name, '/'); + if(!name || !*++name) break; + qlass = class_table_get(name); + } + if(!qlass) { + error("tclpd: class not found: %s", name); + return NULL; + } t_tcl *x = (t_tcl *)pd_new(qlass); + if(!x) { + error("tclpd: failed to create object of class %s", name); + return NULL; + } + + /* used for numbering proxy inlets: */ x->ninlets = 1 /* qlass->c_firstin ??? */; - x->x_glist = (t_glist *)canvas_getcurrent(); x->source_file = (char *)hashtable_get(source_table, name); if(!x->source_file) { |