Commit 834f8cab authored by Jonathan Wilkes's avatar Jonathan Wilkes
Browse files

port from pd-l2ork git: 228bfca3e76a3ffc9274c2188e5fffbade2b4461

*added message object's ability to parse $0 (as per http://lists.puredata.info/pipermail/pd-list/2014-09/107785.html)
parent aab7bacf
......@@ -599,28 +599,44 @@ static void messresponder_anything(t_messresponder *x,
static void message_bang(t_message *x)
{
/* we do canvas_setcurrent/unsetcurrent to substitute canvas
instance number for $0 */
canvas_setcurrent((t_canvas *)x->m_glist);
binbuf_eval(x->m_text.te_binbuf, &x->m_messresponder.mr_pd, 0, 0);
canvas_unsetcurrent((t_canvas *)x->m_glist);
}
static void message_float(t_message *x, t_float f)
{
t_atom at;
SETFLOAT(&at, f);
/* we do canvas_setcurrent/unsetcurrent to substitute canvas
instance number for $0 */
canvas_setcurrent((t_canvas *)x->m_glist);
binbuf_eval(x->m_text.te_binbuf, &x->m_messresponder.mr_pd, 1, &at);
canvas_unsetcurrent((t_canvas *)x->m_glist);
}
static void message_symbol(t_message *x, t_symbol *s)
{
t_atom at;
SETSYMBOL(&at, s);
/* we do canvas_setcurrent/unsetcurrent to substitute canvas
instance number for $0 */
canvas_setcurrent((t_canvas *)x->m_glist);
binbuf_eval(x->m_text.te_binbuf, &x->m_messresponder.mr_pd, 1, &at);
canvas_unsetcurrent((t_canvas *)x->m_glist);
}
static void message_blob(t_message *x, t_blob *st)
{
t_atom at;
SETBLOB(&at, st);
/* we do canvas_setcurrent/unsetcurrent to substitute canvas
instance number for $0 */
canvas_setcurrent((t_canvas *)x->m_glist);
binbuf_eval(x->m_text.te_binbuf, &x->m_messresponder.mr_pd, 1, &at);
canvas_unsetcurrent((t_canvas *)x->m_glist);
}
static void message_list(t_message *x, t_symbol *s, int argc, t_atom *argv)
......@@ -628,9 +644,11 @@ static void message_list(t_message *x, t_symbol *s, int argc, t_atom *argv)
// TODO: here and elsewhere in the message, do we want $0 to be parsed
// into canvas instance? Makes sense since there is no such argument,
// but will this break anything?
//canvas_setcurrent(x->m_glist);
/* we do canvas_setcurrent/unsetcurrent to substitute canvas
instance number for $0 */
canvas_setcurrent((t_canvas *)x->m_glist);
binbuf_eval(x->m_text.te_binbuf, &x->m_messresponder.mr_pd, argc, argv);
//canvas_unsetcurrent(x->m_glist);
canvas_unsetcurrent(x->m_glist);
}
static void message_set(t_message *x, t_symbol *s, int argc, t_atom *argv)
......
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