diff options
author | Thomas O Fredericks <mrtof@users.sourceforge.net> | 2010-10-11 19:00:24 +0000 |
---|---|---|
committer | Thomas O Fredericks <mrtof@users.sourceforge.net> | 2010-10-11 19:00:24 +0000 |
commit | fed569060c1f10dc85302caa518fcdbcabef000a (patch) | |
tree | c621c1e0045c24208f7451d358fd2fcb61b791be /src | |
parent | 1b72557df4495abaf5c2b90d06d99a55429e59c5 (diff) |
Fixed a fix in updating the gui when it was created by param gui. param route also changes empty messages into bangs
svn path=/trunk/externals/tof/; revision=14225
Diffstat (limited to 'src')
-rw-r--r-- | src/param.c | 4 | ||||
-rw-r--r-- | src/paramGui.h | 9 | ||||
-rw-r--r-- | src/paramRoute.h | 10 |
3 files changed, 15 insertions, 8 deletions
diff --git a/src/param.c b/src/param.c index fc8a152..733f40f 100644 --- a/src/param.c +++ b/src/param.c @@ -110,9 +110,9 @@ static void paramClass_anything(t_paramClass *x, t_symbol *s, int ac, t_atom *av #ifdef PARAMDEBUG post("RECEIVING SOMETHING"); #endif - if ( s == &s_bang || ac == 0 ) { + if ( s == &s_bang || ac == 0 ) { x->ac = 0; - x->selector = s; + x->selector = &s_bang; } else { if(ac > x->alloc) { x->av = resizebytes(x->av, x->alloc*sizeof(*(x->av)), diff --git a/src/paramGui.h b/src/paramGui.h index fb9f7c4..96a23b6 100644 --- a/src/paramGui.h +++ b/src/paramGui.h @@ -282,12 +282,13 @@ static void paramGui_buildCanvas(t_paramGui* x,int x_position,int y_position) { pos_y = pos_y + GUI_Y_STEP; gui_update = 0; } - - if ((gui_update) && (receive != s_empty) && (p->get) && (ac_got)) { + //p->get(p->x,&s_got,&ac_got,&av_got); + //post("path: %s selector: %s ac: %i update: %i",p->path->s_name,s_got->s_name,ac_got,gui_update); + if ((gui_update) && (receive != s_empty) && (p->get) ) { p->get(p->x,&s_got,&ac_got,&av_got); - //post("path: %s selector: %s ac: %i",p->path->s_name,s_got->s_name,ac_got); - if ( s_got != &s_bang) tof_send_anything_prepend(receive,s_got,ac_got,av_got,s_set); + + if ( s_got != &s_bang && ac_got) tof_send_anything_prepend(receive,s_got,ac_got,av_got,s_set); } } diff --git a/src/paramRoute.h b/src/paramRoute.h index 5d94e30..df06cb1 100644 --- a/src/paramRoute.h +++ b/src/paramRoute.h @@ -23,7 +23,13 @@ static void paramRoute_anything(t_paramRoute *x, t_symbol *s, int ac, t_atom *av t_param* p = get_param_list(x->root); #endif - if (ac) { + if (ac == 0) { + // Its a bang? + ac = 1; + t_atom a; + SETSYMBOL(&a,&s_bang); + av = &a; + } if ( s->s_name[0] == '/' && strlen(s->s_name) > 1) { @@ -59,7 +65,7 @@ static void paramRoute_anything(t_paramRoute *x, t_symbol *s, int ac, t_atom *av } else { outlet_anything(x->x_outlet,s,ac,av); } - } + } |