Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26528
Modified Files: Tag: desiredata desire.c Log Message: new serial code
Index: desire.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.c,v retrieving revision 1.1.2.217.2.52 retrieving revision 1.1.2.217.2.53 diff -C2 -d -r1.1.2.217.2.52 -r1.1.2.217.2.53 *** desire.c 9 Dec 2006 03:04:06 -0000 1.1.2.217.2.52 --- desire.c 12 Dec 2006 16:32:54 -0000 1.1.2.217.2.53 *************** *** 574,580 **** the toplevel abstraction from showing up. */ if (vis && gensym("#X")->s_thing && gensym("#X")->s_thing->_class == canvas_class) { ! t_canvas *zzz = (t_canvas *)(gensym("#X")->s_thing); ! while (zzz && !zzz->env) zzz = zzz->owner; ! if (zzz && canvas_isabstraction(zzz) && zzz->owner) vis = 0; } x->willvis = vis; --- 574,580 ---- the toplevel abstraction from showing up. */ if (vis && gensym("#X")->s_thing && gensym("#X")->s_thing->_class == canvas_class) { ! t_canvas *z = (t_canvas *)(gensym("#X")->s_thing); ! while (z && !z->env) z = z->owner; ! if (z && canvas_isabstraction(z) && z->owner) vis = 0; } x->willvis = vis; *************** *** 582,589 **** x->next_add = -1; pd_pushsym(x); - pd_set_newest(x); return x; }
void canvas_setgraph(t_canvas *x, int flag, int nogoprect);
--- 582,595 ---- x->next_add = -1; pd_pushsym(x); return x; }
+ /* this one should be used instead, when not used as a t_newmethod. */ + static t_canvas *canvas_new_2(void *dummy, t_symbol *sel, int argc, t_atom *argv) { + t_canvas *x = canvas_new(dummy,sel,argc,argv); + pd_set_newest(x); + return x; + } + void canvas_setgraph(t_canvas *x, int flag, int nogoprect);
*************** *** 864,868 ****
void pd_set_newest (t_pd *x) { - if (newest == x) return; /* hack because otherwise it's complicated to remove duplicates */ newest = x; if (!pd_origin()) return; /* the following only applies to objects created by client */ --- 870,873 ---- *************** *** 935,939 **** SETSYMBOL(a+4, s); SETFLOAT(a+5, 0); ! t_canvas *x = canvas_new(0, 0, 6, a); x->owner = z; /* create a graph for the table */ --- 940,944 ---- SETSYMBOL(a+4, s); SETFLOAT(a+5, 0); ! t_canvas *x = canvas_new_2(0,0,6,a); x->owner = z; /* create a graph for the table */ *************** *** 3691,3695 **** else if (type == DT_LIST) { /* LATER test this and get it to work */ ! wp->w_list = canvas_new(0, 0, 0, 0); } } --- 3696,3700 ---- else if (type == DT_LIST) { /* LATER test this and get it to work */ ! wp->w_list = canvas_new_2(0,0,0,0); } } *************** *** 7758,7762 **** /* here is the real creator function, invoked in patch files by sending the "canvas" message to #N, which is bound to pd_canvasmaker. */ ! class_addmethod3(pd_canvasmaker._class,canvas_new,"canvas","*"); class_addmethod3(c,canvas_restore,"restore","*"); class_addmethod3(c,canvas_coords,"coords","*"); --- 7763,7767 ---- /* here is the real creator function, invoked in patch files by sending the "canvas" message to #N, which is bound to pd_canvasmaker. */ ! class_addmethod3(pd_canvasmaker._class,canvas_new_2,"canvas","*"); class_addmethod3(c,canvas_restore,"restore","*"); class_addmethod3(c,canvas_coords,"coords","*");