Commit 48cfe7e5 authored by Ivica Bukvic's avatar Ivica Bukvic
Browse files

Fixed route object to properly process bang messages regardless of the mode it may be using

Improved route-help.pd to make it easier to understand
parent 8bf9dbb5
......@@ -485,7 +485,6 @@ multiple creation arguments \, you'll notice that this second inlet
is absent.;
#X obj 23 256 route 42;
#X obj 217 276 route word;
#X floatatom 23 278 5 0 0 0 - - -, f 5;
#X msg 23 210 42;
#X obj 217 255 list trim;
#X text 20 128 Also notice in the right example how symbols need to
......@@ -493,20 +492,22 @@ be truncated of its symbol prefix using [list trim] or using a message.
Otherwise \, route will not recognize the value correctly.;
#X msg 164 206 word;
#X msg 125 182 symbol word;
#X obj 23 281 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X connect 1 0 12 0;
#X connect 2 0 12 1;
#X connect 4 0 16 0;
#X connect 5 0 16 0;
#X connect 4 0 15 0;
#X connect 5 0 15 0;
#X connect 6 0 13 1;
#X connect 8 0 13 1;
#X connect 12 0 14 0;
#X connect 12 0 19 0;
#X connect 12 1 0 0;
#X connect 13 0 3 0;
#X connect 13 1 7 0;
#X connect 15 0 12 0;
#X connect 16 0 13 0;
#X connect 14 0 12 0;
#X connect 15 0 13 0;
#X connect 17 0 13 0;
#X connect 18 0 13 0;
#X connect 19 0 13 0;
#X restore 171 416 pd second_inlet;
#X text 98 400 symbol;
#X text 167 386 - the right inlet is available if there is only one
......
......@@ -571,6 +571,11 @@ static void route_anything(t_route *x, t_symbol *sel, int argc, t_atom *argv)
outlet_anything(x->x_rejectout, sel, argc, argv);
}
static void route_bang(t_route *x)
{
route_anything(x, gensym("bang"), 0, NULL);
}
static void route_list(t_route *x, t_symbol *sel, int argc, t_atom *argv)
{
//fprintf(stderr,"route_list\n");
......@@ -712,6 +717,7 @@ void route_setup(void)
(t_method)route_free, sizeof(t_route), 0, A_GIMME, 0);
class_addlist(route_class, route_list);
class_addanything(route_class, route_anything);
class_addbang(route_class, route_bang);
}
/* -------------------------- pack ------------------------------ */
......
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