Commit e7385467 authored by Ivica Bukvic's avatar Ivica Bukvic
Browse files

*fixed lingering bug where static symbols did not project values properly...

*fixed lingering bug where static symbols did not project values properly because they did not gensym their own instance.
parent 1c7e9976
...@@ -1037,7 +1037,7 @@ static t_class *trigger_class; ...@@ -1037,7 +1037,7 @@ static t_class *trigger_class;
typedef struct triggerout typedef struct triggerout
{ {
int u_type; /* outlet type from above */ int u_type; /* outlet type from above */
t_symbol u_sym; /* static value */ t_symbol *u_sym; /* static value */
t_float u_float; /* static value */ t_float u_float; /* static value */
t_outlet *u_outlet; t_outlet *u_outlet;
} t_triggerout; } t_triggerout;
...@@ -1117,7 +1117,7 @@ static void *trigger_new(t_symbol *s, int argc, t_atom *argv) ...@@ -1117,7 +1117,7 @@ static void *trigger_new(t_symbol *s, int argc, t_atom *argv)
else if (c == 'S') else if (c == 'S')
{ {
//static symbol //static symbol
u->u_sym = *ap->a_w.w_symbol; u->u_sym = gensym(ap->a_w.w_symbol->s_name);
u->u_type = TR_STATIC_SYMBOL; u->u_type = TR_STATIC_SYMBOL;
u->u_outlet = outlet_new(&x->x_obj, &s_symbol); u->u_outlet = outlet_new(&x->x_obj, &s_symbol);
} }
...@@ -1157,7 +1157,7 @@ static void trigger_list(t_trigger *x, t_symbol *s, int argc, t_atom *argv) ...@@ -1157,7 +1157,7 @@ static void trigger_list(t_trigger *x, t_symbol *s, int argc, t_atom *argv)
} }
else if (u->u_type == TR_STATIC_SYMBOL) else if (u->u_type == TR_STATIC_SYMBOL)
{ {
outlet_symbol(u->u_outlet, &u->u_sym); outlet_symbol(u->u_outlet, u->u_sym);
} }
else outlet_list(u->u_outlet, &s_list, argc, argv); else outlet_list(u->u_outlet, &s_list, argc, argv);
} }
...@@ -1184,7 +1184,7 @@ static void trigger_anything(t_trigger *x, t_symbol *s, int argc, t_atom *argv) ...@@ -1184,7 +1184,7 @@ static void trigger_anything(t_trigger *x, t_symbol *s, int argc, t_atom *argv)
} }
else if (u->u_type == TR_STATIC_SYMBOL) else if (u->u_type == TR_STATIC_SYMBOL)
{ {
outlet_symbol(u->u_outlet, &u->u_sym); outlet_symbol(u->u_outlet, u->u_sym);
} }
//else trigger_symbol(x, s); //else trigger_symbol(x, s);
else else
...@@ -1227,7 +1227,7 @@ static void trigger_anything(t_trigger *x, t_symbol *s, int argc, t_atom *argv) ...@@ -1227,7 +1227,7 @@ static void trigger_anything(t_trigger *x, t_symbol *s, int argc, t_atom *argv)
else if (u->u_type == TR_STATIC_SYMBOL) else if (u->u_type == TR_STATIC_SYMBOL)
{ {
//fprintf(stderr,"trigger_anything -> TR_STATIC_SYMBOL %d\n", argc); //fprintf(stderr,"trigger_anything -> TR_STATIC_SYMBOL %d\n", argc);
outlet_symbol(u->u_outlet, &u->u_sym); outlet_symbol(u->u_outlet, u->u_sym);
} }
else else
{ {
......
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