Commit fe1c7b37 authored by Jonathan Wilkes's avatar Jonathan Wilkes
Browse files

add ".pd" extension to abstraction name in canvas type definition

parent 18ab6094
...@@ -88,7 +88,7 @@ t_template *template_new(t_symbol *templatesym, int argc, t_atom *argv) ...@@ -88,7 +88,7 @@ t_template *template_new(t_symbol *templatesym, int argc, t_atom *argv)
// newtype = DT_LIST; // newtype = DT_LIST;
else if (newtypesym == gensym("canvas")) else if (newtypesym == gensym("canvas"))
{ {
t_symbol *filename; char filename[MAXPDSTRING+3];
t_binbuf *b = binbuf_new(); t_binbuf *b = binbuf_new();
if (argc < 3 || argv[2].a_type != A_SYMBOL) if (argc < 3 || argv[2].a_type != A_SYMBOL)
{ {
...@@ -96,9 +96,9 @@ t_template *template_new(t_symbol *templatesym, int argc, t_atom *argv) ...@@ -96,9 +96,9 @@ t_template *template_new(t_symbol *templatesym, int argc, t_atom *argv)
goto bad; goto bad;
} }
// filename = canvas_makebindsym(argv[2].a_w.w_symbol); // filename = canvas_makebindsym(argv[2].a_w.w_symbol);
filename = argv[2].a_w.w_symbol; sprintf(filename, "%s.pd", argv[2].a_w.w_symbol->s_name);
if (binbuf_read_via_canvas(b, filename->s_name, canvas_getcurrent(), 0)) if (binbuf_read_via_canvas(b, filename, canvas_getcurrent(), 0))
post("warning: abstraction %s not found", filename->s_name); post("warning: abstraction %s not found", filename);
else else
newbinbuf = b; newbinbuf = b;
newtype = DT_LIST; newtype = DT_LIST;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment