Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4054
Modified Files: Tag: desiredata m_pd.h desire.c Log Message: shorthands for t_scalar
Index: m_pd.h =================================================================== RCS file: /cvsroot/pure-data/pd/src/m_pd.h,v retrieving revision 1.4.4.11.2.33.2.3 retrieving revision 1.4.4.11.2.33.2.4 diff -C2 -d -r1.4.4.11.2.33.2.3 -r1.4.4.11.2.33.2.4 *** m_pd.h 2 Dec 2006 05:37:19 -0000 1.4.4.11.2.33.2.3 --- m_pd.h 2 Dec 2006 05:41:19 -0000 1.4.4.11.2.33.2.4 *************** *** 235,242 **** t_gobj sc_gobj; /* header for graphical object */ #endif ! t_symbol *sc_template; /* template name (LATER replace with pointer) */ ! t_word sc_vec[1]; /* indeterminate-length array of words */ } t_scalar;
#ifdef PD_PLUSPLUS_FACE typedef struct t_text : t_gobj { --- 235,245 ---- t_gobj sc_gobj; /* header for graphical object */ #endif ! t_symbol *t; /* template name (LATER replace with pointer) */ ! t_word v[1]; /* indeterminate-length array of words */ } t_scalar;
+ #define sc_template t + #define sc_vec v + #ifdef PD_PLUSPLUS_FACE typedef struct t_text : t_gobj {
Index: desire.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.c,v retrieving revision 1.1.2.217.2.10 retrieving revision 1.1.2.217.2.11 diff -C2 -d -r1.1.2.217.2.10 -r1.1.2.217.2.11 *** desire.c 2 Dec 2006 05:37:20 -0000 1.1.2.217.2.10 --- desire.c 2 Dec 2006 05:41:19 -0000 1.1.2.217.2.11 *************** *** 1561,1575 **** t_symbol *zarraytype; t_scalar *sc = x->scalar; ! t_template *t = template_findbyname(sc->sc_template); ! TEMPLATE_CHECK(x,sc->sc_template,0) if (!template_find_field(t, gensym("z"), &zonset, &ztype, &zarraytype)) { ! pd_error(x,"template %s has no 'z' field", sc->sc_template->s_name); return 0; } if (ztype != DT_ARRAY) { ! pd_error(x,"template %s, 'z' field is not an array", sc->sc_template->s_name); return 0; } ! return sc->sc_vec[zonset].w_array; }
--- 1561,1575 ---- t_symbol *zarraytype; t_scalar *sc = x->scalar; ! t_template *t = template_findbyname(sc->t); ! TEMPLATE_CHECK(x,sc->t,0) if (!template_find_field(t, gensym("z"), &zonset, &ztype, &zarraytype)) { ! pd_error(x,"template %s has no 'z' field", sc->t->s_name); return 0; } if (ztype != DT_ARRAY) { ! pd_error(x,"template %s, 'z' field is not an array", sc->t->s_name); return 0; } ! return sc->v[zonset].w_array; }
*************** *** 1638,1644 **** t_garray *x = graph_scalar(gl, s, templatesym, saveit); if (n <= 0) n = 100; ! array_resize(x->scalar->sc_vec[zonset].w_array, n); ! template_setfloat(t, gensym("style"), x->scalar->sc_vec, style, 1); ! template_setfloat(t, gensym("linewidth"), x->scalar->sc_vec, style==PLOTSTYLE_POINTS?2:1, 1); t_pd *x2 = pd_findbyclass(gensym("#A"), garray_class); if (x2) pd_unbind(x2,gensym("#A")); --- 1638,1644 ---- t_garray *x = graph_scalar(gl, s, templatesym, saveit); if (n <= 0) n = 100; ! array_resize(x->scalar->v[zonset].w_array, n); ! template_setfloat(t, gensym("style"), x->scalar->v, style, 1); ! template_setfloat(t, gensym("linewidth"), x->scalar->v, style==PLOTSTYLE_POINTS?2:1, 1); t_pd *x2 = pd_findbyclass(gensym("#A"), garray_class); if (x2) pd_unbind(x2,gensym("#A")); *************** *** 1679,1683 **** int style = ((flags & 6) >> 1); float stylewas = template_getfloat( ! template_findbyname(x->scalar->sc_template), gensym("style"), x->scalar->sc_vec, 1); if (deleteit != 0) { canvas_delete(x->canvas,x); --- 1679,1683 ---- int style = ((flags & 6) >> 1); float stylewas = template_getfloat( ! template_findbyname(x->scalar->t), gensym("style"), x->scalar->v, 1); if (deleteit != 0) { canvas_delete(x->canvas,x); *************** *** 1688,1693 **** t_template *scalartemplate; if (!a) {pd_error(x, "can't find array"); return;} ! if (!(scalartemplate = template_findbyname(x->scalar->sc_template))) { ! pd_error(x,"no template of type %s", x->scalar->sc_template->s_name); return; } --- 1688,1693 ---- t_template *scalartemplate; if (!a) {pd_error(x, "can't find array"); return;} ! if (!(scalartemplate = template_findbyname(x->scalar->t))) { ! pd_error(x,"no template of type %s", x->scalar->t->s_name); return; } *************** *** 1706,1710 **** if (size != a->n) garray_resize(x, size); else if (style != stylewas) garray_fittograph(x, size, style); ! template_setfloat(scalartemplate, gensym("style"), x->scalar->sc_vec, (float)style, 0); garray_setsaveit(x, saveit!=0); garray_redraw(x); --- 1706,1710 ---- if (size != a->n) garray_resize(x, size); else if (style != stylewas) garray_fittograph(x, size, style); ! template_setfloat(scalartemplate, gensym("style"), x->scalar->v, (float)style, 0); garray_setsaveit(x, saveit!=0); garray_redraw(x); *************** *** 1994,2007 **** t_array *array = garray_getarray(x); t_template *scalartemplate; ! if (x->scalar->sc_template != gensym("pd-_float_array")) { /* LATER "save" the scalar as such */ ! pd_error(x,"can't save arrays of type %s yet", x->scalar->sc_template->s_name); return; } ! if (!(scalartemplate = template_findbyname(x->scalar->sc_template))) { ! pd_error(x,"no template of type %s", x->scalar->sc_template->s_name); return; } ! style = (int)template_getfloat(scalartemplate, gensym("style"), x->scalar->sc_vec, 0); filestyle = (style == PLOTSTYLE_POINTS ? 1 : (style == PLOTSTYLE_POLY ? 0 : style)); binbuf_addv(b, "sssisi;", gensym("#X"), gensym("array"), --- 1994,2007 ---- t_array *array = garray_getarray(x); t_template *scalartemplate; ! if (x->scalar->t != gensym("pd-_float_array")) { /* LATER "save" the scalar as such */ ! pd_error(x,"can't save arrays of type %s yet", x->scalar->t->s_name); return; } ! if (!(scalartemplate = template_findbyname(x->scalar->t))) { ! pd_error(x,"no template of type %s", x->scalar->t->s_name); return; } ! style = (int)template_getfloat(scalartemplate, gensym("style"), x->scalar->v, 0); filestyle = (style == PLOTSTYLE_POINTS ? 1 : (style == PLOTSTYLE_POLY ? 0 : style)); binbuf_addv(b, "sssisi;", gensym("#X"), gensym("array"), *************** *** 2217,2221 **** int n = f<1?1:(int)f; garray_fittograph(x, n, (int)template_getfloat( ! template_findbyname(x->scalar->sc_template), gensym("style"), x->scalar->sc_vec, 1)); array_resize_and_redraw(array, n); if (x->usedindsp) canvas_update_dsp(); --- 2217,2221 ---- int n = f<1?1:(int)f; garray_fittograph(x, n, (int)template_getfloat( ! template_findbyname(x->scalar->t), gensym("style"), x->scalar->v, 1)); array_resize_and_redraw(array, n); if (x->usedindsp) canvas_update_dsp(); *************** *** 2797,2801 **** int message; int nline = canvas_scanbinbuf(natoms, vec, &message, p_nextmsg); ! canvas_readatoms(x, natoms, vec, p_nextmsg, templatesym, sc->sc_vec, nline, vec + message); if (wasvis) canvas_getcanvas(x)->mapped = 1; gobj_changed(sc,0); --- 2797,2801 ---- int message; int nline = canvas_scanbinbuf(natoms, vec, &message, p_nextmsg); ! canvas_readatoms(x, natoms, vec, p_nextmsg, templatesym, sc->v, nline, vec + message); if (wasvis) canvas_getcanvas(x)->mapped = 1; gobj_changed(sc,0); *************** *** 2987,2991 **** for (; y; y = y->g_next) if (y->_class==scalar_class) { t_scalar *z = (t_scalar *)y; ! canvas_writescalar(z->sc_template, z->sc_vec, b, 0); } } --- 2987,2991 ---- for (; y; y = y->g_next) if (y->_class==scalar_class) { t_scalar *z = (t_scalar *)y; ! canvas_writescalar(z->t, z->v, b, 0); } } *************** *** 3017,3021 **** for (; y; y = y->g_next) if (y->_class == scalar_class) { t_scalar *z = (t_scalar *)y; ! canvas_addtemplatesforscalar(z->sc_template, z->sc_vec, p_ntemplates, p_templatevec); } } --- 3017,3021 ---- for (; y; y = y->g_next) if (y->_class == scalar_class) { t_scalar *z = (t_scalar *)y; ! canvas_addtemplatesforscalar(z->t, z->v, p_ntemplates, p_templatevec); } } *************** *** 3027,3031 **** canvas_each(y,x) if (y->_class==scalar_class) { t_scalar *s = (t_scalar *)y; ! canvas_addtemplatesforscalar(s->sc_template, s->sc_vec, &ntemplates, &templatevec); } binbuf_addv(b, "s;", gensym("data")); --- 3027,3031 ---- canvas_each(y,x) if (y->_class==scalar_class) { t_scalar *s = (t_scalar *)y; ! canvas_addtemplatesforscalar(s->t, s->v, &ntemplates, &templatevec); } binbuf_addv(b, "s;", gensym("data")); *************** *** 3054,3058 **** canvas_each(y,x) if (y->_class==scalar_class) { t_scalar *z = (t_scalar *)y; ! canvas_writescalar(z->sc_template, z->sc_vec, b, 0); } return b; --- 3054,3058 ---- canvas_each(y,x) if (y->_class==scalar_class) { t_scalar *z = (t_scalar *)y; ! canvas_writescalar(z->t, z->v, b, 0); } return b; *************** *** 3121,3125 **** if (y->_class==scalar_class) { t_scalar *z = (t_scalar *)y; ! canvas_addtemplatesforscalar(z->sc_template, z->sc_vec, ntemplatesp, templatevecp); } else if (y->_class==canvas_class) { canvas_collecttemplatesfor((t_canvas *)y, ntemplatesp, templatevecp); --- 3121,3125 ---- if (y->_class==scalar_class) { t_scalar *z = (t_scalar *)y; ! canvas_addtemplatesforscalar(z->t, z->v, ntemplatesp, templatevecp); } else if (y->_class==canvas_class) { canvas_collecttemplatesfor((t_canvas *)y, ntemplatesp, templatevecp); *************** *** 3739,3747 **** t_template *t = template_findbyname(templatesym); TEMPLATE_CHECK(owner,templatesym,0) ! t_scalar *x = (t_scalar *)getbytes(sizeof(t_scalar) + (t->n - 1) * sizeof(*x->sc_vec)); x->_class = scalar_class; ! x->sc_template = templatesym; gpointer_setcanvas(&gp, owner, x); ! word_init(x->sc_vec, t, &gp); return x; } --- 3739,3747 ---- t_template *t = template_findbyname(templatesym); TEMPLATE_CHECK(owner,templatesym,0) ! t_scalar *x = (t_scalar *)getbytes(sizeof(t_scalar) + (t->n - 1) * sizeof(*x->v)); x->_class = scalar_class; ! x->t = templatesym; gpointer_setcanvas(&gp, owner, x); ! word_init(x->v, t, &gp); return x; } *************** *** 3766,3772 ****
static void scalar_getbasexy(t_scalar *x, float *basex, float *basey) { ! t_template *t = template_findbyname(x->sc_template); ! *basex = template_getfloat(t, gensym("x"), x->sc_vec, 0); ! *basey = template_getfloat(t, gensym("y"), x->sc_vec, 0); }
--- 3766,3772 ----
static void scalar_getbasexy(t_scalar *x, float *basex, float *basey) { ! t_template *t = template_findbyname(x->t); ! *basex = template_getfloat(t, gensym("x"), x->v, 0); ! *basey = template_getfloat(t, gensym("y"), x->v, 0); }
*************** *** 3774,3778 **** static void scalar_displace(t_gobj *z, t_canvas *canvas, int dx, int dy) { t_scalar *x = (t_scalar *)z; ! t_symbol *templatesym = x->sc_template; t_template *t = template_findbyname(templatesym); t_symbol *zz; --- 3774,3778 ---- static void scalar_displace(t_gobj *z, t_canvas *canvas, int dx, int dy) { t_scalar *x = (t_scalar *)z; ! t_symbol *templatesym = x->t; t_template *t = template_findbyname(templatesym); t_symbol *zz; *************** *** 3783,3789 **** goty = template_find_field(t, gensym("y"), &yonset, &ytype, &zz); if (goty && (ytype != DT_FLOAT)) goty = 0; ! if (gotx) *(t_float *)(((char *)(x->sc_vec)) + xonset) += dx * (canvas_pixelstox(canvas, 1) - canvas_pixelstox(canvas, 0)); ! if (goty) *(t_float *)(((char *)(x->sc_vec)) + yonset) += dy * (canvas_pixelstoy(canvas, 1) - canvas_pixelstoy(canvas, 0)); scalar_redraw(x, canvas); --- 3783,3789 ---- goty = template_find_field(t, gensym("y"), &yonset, &ytype, &zz); if (goty && (ytype != DT_FLOAT)) goty = 0; ! if (gotx) *(t_float *)(((char *)(x->v)) + xonset) += dx * (canvas_pixelstox(canvas, 1) - canvas_pixelstox(canvas, 0)); ! if (goty) *(t_float *)(((char *)(x->v)) + yonset) += dy * (canvas_pixelstoy(canvas, 1) - canvas_pixelstoy(canvas, 0)); scalar_redraw(x, canvas); *************** *** 3792,3796 **** static void scalar_vis(t_gobj *z, t_canvas *owner, int vis) { t_scalar *x = (t_scalar *)z; ! t_template *t = template_findbyname(x->sc_template); t_canvas *templatecanvas = template_findcanvas(t); float basex, basey; --- 3792,3796 ---- static void scalar_vis(t_gobj *z, t_canvas *owner, int vis) { t_scalar *x = (t_scalar *)z; ! t_template *t = template_findbyname(x->t); t_canvas *templatecanvas = template_findcanvas(t); float basex, basey; *************** *** 3808,3812 **** canvas_each(y,templatecanvas) { t_parentwidgetbehavior *wb = pd_getparentwidget(y); ! if (wb) wb->w_parentvisfn(y, owner, x->sc_vec, t, basex, basey, vis); } //sys_unqueuegui(x); --- 3808,3812 ---- canvas_each(y,templatecanvas) { t_parentwidgetbehavior *wb = pd_getparentwidget(y); ! if (wb) wb->w_parentvisfn(y, owner, x->v, t, basex, basey, vis); } //sys_unqueuegui(x); *************** *** 3841,3846 **** int xpix, int ypix, int shift, int alt, int dbl, int doit) { t_scalar *x = (t_scalar *)z; ! t_template *t = template_findbyname(x->sc_template); ! return scalar_doclick(x->sc_vec, t, x, 0, owner, 0, 0, xpix, ypix, shift, alt, dbl, doit); }
--- 3841,3846 ---- int xpix, int ypix, int shift, int alt, int dbl, int doit) { t_scalar *x = (t_scalar *)z; ! t_template *t = template_findbyname(x->t); ! return scalar_doclick(x->v, t, x, 0, owner, 0, 0, xpix, ypix, shift, alt, dbl, doit); }
*************** *** 3850,3854 **** t_scalar *x = (t_scalar *)z; t_binbuf *b2 = binbuf_new(); ! canvas_writescalar(x->sc_template, x->sc_vec, b2, 0); binbuf_addv(b, "ss", &s__X, gensym("scalar")); binbuf_addbinbuf(b, b2); --- 3850,3854 ---- t_scalar *x = (t_scalar *)z; t_binbuf *b2 = binbuf_new(); ! canvas_writescalar(x->t, x->v, b2, 0); binbuf_addv(b, "ss", &s__X, gensym("scalar")); binbuf_addbinbuf(b, b2); *************** *** 3877,3888 ****
static void scalar_free(t_scalar *x) { ! t_symbol *templatesym = x->sc_template; t_template *t = template_findbyname(templatesym); TEMPLATE_CHECK(x,templatesym,) ! word_free(x->sc_vec, t); gfxstub_deleteforkey(x); /* the "size" field in the class is zero, so Pd doesn't try to free us automatically (see pd_free()) */ ! freebytes(x, sizeof(t_scalar) + (t->n - 1) * sizeof(*x->sc_vec)); }
--- 3877,3888 ----
static void scalar_free(t_scalar *x) { ! t_symbol *templatesym = x->t; t_template *t = template_findbyname(templatesym); TEMPLATE_CHECK(x,templatesym,) ! word_free(x->v, t); gfxstub_deleteforkey(x); /* the "size" field in the class is zero, so Pd doesn't try to free us automatically (see pd_free()) */ ! freebytes(x, sizeof(t_scalar) + (t->n - 1) * sizeof(*x->v)); }
*************** *** 4064,4078 **** t_template *scalartemplate; /* possibly replace the scalar */ ! if (scfrom->sc_template == tfrom->sym) { /* see scalar_new() for comment about the gpointer. */ gpointer_init(&gp); ! x = (t_scalar *)getbytes(sizeof(t_scalar) + (tto->n - 1) * sizeof(*x->sc_vec)); x->_class = scalar_class; ! x->sc_template = tfrom->sym; gpointer_setcanvas(&gp, canvas, x); /* Here we initialize to the new template, but array and list elements will still belong to old template. */ ! word_init(x->sc_vec, tto, &gp); ! template_conformwords(tfrom, tto, conformaction, scfrom->sc_vec, x->sc_vec); /* replace the old one with the new one in the list */ if (canvas->list == scfrom) { --- 4064,4078 ---- t_template *scalartemplate; /* possibly replace the scalar */ ! if (scfrom->t == tfrom->sym) { /* see scalar_new() for comment about the gpointer. */ gpointer_init(&gp); ! x = (t_scalar *)getbytes(sizeof(t_scalar) + (tto->n - 1) * sizeof(*x->v)); x->_class = scalar_class; ! x->t = tfrom->sym; gpointer_setcanvas(&gp, canvas, x); /* Here we initialize to the new template, but array and list elements will still belong to old template. */ ! word_init(x->v, tto, &gp); ! template_conformwords(tfrom, tto, conformaction, scfrom->v, x->v); /* replace the old one with the new one in the list */ if (canvas->list == scfrom) { *************** *** 4092,4102 **** } else { x = scfrom; ! scalartemplate = template_findbyname(x->sc_template); } /* convert all array elements and sublists */ for (int i=0; i < scalartemplate->n; i++) { t_dataslot *ds = scalartemplate->vec + i; ! if (ds->type == DT_LIST) template_conformcanvas(tfrom, tto, conformaction, x->sc_vec[i].w_list); ! if (ds->type == DT_ARRAY) template_conformarray(tfrom, tto, conformaction, x->sc_vec[i].w_array); } return x; --- 4092,4102 ---- } else { x = scfrom; ! scalartemplate = template_findbyname(x->t); } /* convert all array elements and sublists */ for (int i=0; i < scalartemplate->n; i++) { t_dataslot *ds = scalartemplate->vec + i; ! if (ds->type == DT_LIST) template_conformcanvas(tfrom, tto, conformaction, x->v[i].w_list); ! if (ds->type == DT_ARRAY) template_conformarray(tfrom, tto, conformaction, x->v[i].w_array); } return x; *************** *** 5274,5278 **** static t_symbol *gpointer_gettemplatesym(const t_gpointer *gp) { t_gstub *gs = gp->gp_stub; ! if (gs->gs_which == GP_GLIST) {t_scalar *sc = gp->gp_un.gp_scalar; return sc ? sc->sc_template : 0;} else {t_array *a = gs->gs_un.gs_array; return a->templatesym;} } --- 5274,5278 ---- static t_symbol *gpointer_gettemplatesym(const t_gpointer *gp) { t_gstub *gs = gp->gp_stub; ! if (gs->gs_which == GP_GLIST) {t_scalar *sc = gp->gp_un.gp_scalar; return sc ? sc->t : 0;} else {t_array *a = gs->gs_un.gs_array; return a->templatesym;} } *************** *** 5369,5373 **** gp->gp_un.gp_scalar = sc; for (int n = x->ntypedout; n--; to++) ! if (to->type == sc->sc_template) {outlet_pointer(to->outlet, &x->gp); return;} outlet_pointer(x->otherout, &x->gp); } else { --- 5369,5373 ---- gp->gp_un.gp_scalar = sc; for (int n = x->ntypedout; n--; to++) ! if (to->type == sc->t) {outlet_pointer(to->outlet, &x->gp); return;} outlet_pointer(x->otherout, &x->gp); } else { *************** *** 5465,5469 **** TEMPLATE_CHECK(x,x->templatesym,) if (!gpointer_check(gp, 0)) {pd_error(x, "stale or empty pointer"); return;} ! t_word *vec = gs->gs_which==GP_ARRAY ? gp->gp_un.gp_w : gp->gp_un.gp_scalar->sc_vec; vp = x->variables + nitems-1; for (int i=nitems-1; i>=0; i--, vp--) { --- 5465,5469 ---- TEMPLATE_CHECK(x,x->templatesym,) if (!gpointer_check(gp, 0)) {pd_error(x, "stale or empty pointer"); return;} ! t_word *vec = gs->gs_which==GP_ARRAY ? gp->gp_un.gp_w : gp->gp_un.gp_scalar->v; vp = x->variables + nitems-1; for (int i=nitems-1; i>=0; i--, vp--) { *************** *** 5539,5543 **** } if (!nitems) return; ! t_word *vec = gs->gs_which == GP_ARRAY ? gp->gp_un.gp_w : gp->gp_un.gp_scalar->sc_vec; t_setvariable *vp=x->variables; if (x->issymbol) --- 5539,5543 ---- } if (!nitems) return; ! t_word *vec = gs->gs_which == GP_ARRAY ? gp->gp_un.gp_w : gp->gp_un.gp_scalar->v; t_setvariable *vp=x->variables; if (x->issymbol) *************** *** 5603,5607 **** return; } ! t_word *w = gparent->gp_stub->gs_which==GP_ARRAY ? gparent->gp_un.gp_w : gparent->gp_un.gp_scalar->sc_vec; TEMPLATE_CHECK(x,x->templatesym,) if (!template_find_field(t, fieldsym, &onset, &type, &elemtemplatesym)) { --- 5603,5607 ---- return; } ! t_word *w = gparent->gp_stub->gs_which==GP_ARRAY ? gparent->gp_un.gp_w : gparent->gp_un.gp_scalar->v; TEMPLATE_CHECK(x,x->templatesym,) if (!template_find_field(t, fieldsym, &onset, &type, &elemtemplatesym)) { *************** *** 5662,5666 **** return; } ! t_word *w = gs->gs_which==GP_ARRAY ? gp->gp_un.gp_w : gp->gp_un.gp_scalar->sc_vec; t_array *array = *(t_array **)(((char *)w) + onset); outlet_float(x->ob_outlet, (float)(array->n)); --- 5662,5666 ---- return; } ! t_word *w = gs->gs_which==GP_ARRAY ? gp->gp_un.gp_w : gp->gp_un.gp_scalar->v; t_array *array = *(t_array **)(((char *)w) + onset); outlet_float(x->ob_outlet, (float)(array->n)); *************** *** 5697,5701 **** return; } ! t_word *w = gs->gs_which==GP_ARRAY ? gp->gp_un.gp_w : gp->gp_un.gp_scalar->sc_vec; TEMPLATE_CHECK(x,x->templatesym,) t_symbol *elemtemplatesym; --- 5697,5701 ---- return; } ! t_word *w = gs->gs_which==GP_ARRAY ? gp->gp_un.gp_w : gp->gp_un.gp_scalar->v; TEMPLATE_CHECK(x,x->templatesym,) t_symbol *elemtemplatesym; *************** *** 5807,5811 **** gobj_changed(sc,0); gp->gp_un.gp_scalar = sc; ! vec = sc->sc_vec; vp=x->variables; for (int i=0; i<nitems; i++,vp++) template_setfloat(t, vp->sym, vec, vp->f, 1); --- 5807,5811 ---- gobj_changed(sc,0); gp->gp_un.gp_scalar = sc; ! vec = sc->v; vp=x->variables; for (int i=0; i<nitems; i++,vp++) template_setfloat(t, vp->sym, vec, vp->f, 1); *************** *** 5850,5854 **** } if (type != DT_LIST) {pd_error(x, "field %s not of type list", x->fieldsym->s_name); return;} ! t_word *w = gs->gs_which==GP_ARRAY ? gp->gp_un.gp_w : gp->gp_un.gp_scalar->sc_vec; gpointer_setcanvas(&x->gp, *(t_canvas **)(((char *)w) + onset), 0); outlet_pointer(x->ob_outlet, &x->gp); --- 5850,5854 ---- } if (type != DT_LIST) {pd_error(x, "field %s not of type list", x->fieldsym->s_name); return;} ! t_word *w = gs->gs_which==GP_ARRAY ? gp->gp_un.gp_w : gp->gp_un.gp_scalar->v; gpointer_setcanvas(&x->gp, *(t_canvas **)(((char *)w) + onset), 0); outlet_pointer(x->ob_outlet, &x->gp);