Update of /cvsroot/pure-data/externals/bbogart/entry In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32393
Modified Files: entry-help.pd entry.c Log Message: added support for adding and setting with floats
Index: entry.c =================================================================== RCS file: /cvsroot/pure-data/externals/bbogart/entry/entry.c,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** entry.c 26 Oct 2007 04:49:50 -0000 1.14 --- entry.c 27 Oct 2007 23:50:16 -0000 1.15 *************** *** 17,20 **** --- 17,21 ----
#include <m_pd.h> + #include <m_imp.h> #include <g_canvas.h> #include <stdio.h> *************** *** 26,31 **** /* TODO: make [size( message redraw object */ /* TODO: set message doesnt work with a loadbang */ ! /* TODO: add [append( message to add contents after existing contents, just ! * base it on the set method, without the preceeding delete */
#ifdef _MSC_VER --- 27,32 ---- /* TODO: make [size( message redraw object */ /* TODO: set message doesnt work with a loadbang */ ! /* TODO: make message to add a single character to the existing text */ ! /* TODO: make scrollbar (check .printout.text in u_main.tk) */
#ifdef _MSC_VER *************** *** 383,394 **** DEBUG(post("entry_add");); int i; ! t_symbol *tmp = s; /* <-- this gets rid of the unused variable warning */
for(i=0; i<argc ; i++) { ! tmp = atom_getsymbol(argv+i); ! DEBUG(post("lappend ::entry%lx::list %s \n", x, tmp->s_name );); ! sys_vgui("lappend ::entry%lx::list %s \n", x, tmp->s_name ); } DEBUG(post("%s insert end $::entry%lx::list ; unset ::entry%lx::list \n", x->x_widget_name, x, x );); --- 384,407 ---- DEBUG(post("entry_add");); int i; ! t_symbol *tmp_symbol = s; /* <-- this gets rid of the unused variable warning */ ! t_float tmp_float;
for(i=0; i<argc ; i++) { ! tmp_symbol = atom_getsymbolarg(i, argc, argv); ! if(tmp_symbol == &s_) ! { ! tmp_float = atom_getfloatarg(i, argc , argv); ! DEBUG(post("lappend ::entry%lx::list %g \n", x, tmp_float );); ! sys_vgui("lappend ::entry%lx::list %g \n", x, tmp_float ); ! } ! else ! { ! DEBUG(post("lappend ::entry%lx::list %s \n", x, tmp_symbol->s_name );); ! sys_vgui("lappend ::entry%lx::list %s \n", x, tmp_symbol->s_name ); ! } } + DEBUG(post("append ::entry%lx::list " "\n", x);); + sys_vgui("append ::entry%lx::list " "\n", x); DEBUG(post("%s insert end $::entry%lx::list ; unset ::entry%lx::list \n", x->x_widget_name, x, x );); *************** *** 491,498 ****
binbuf_addv(b, "ssiisiiss", gensym("#X"),gensym("obj"), ! x->x_obj.te_xpix, x->x_obj.te_ypix , gensym("entry"), x->x_width, x->x_height, x->x_bgcolour, x->x_fgcolour); binbuf_addv(b, ";"); - // post("objectclass: %s", ((t_pd *)x)->); }
--- 504,510 ----
binbuf_addv(b, "ssiisiiss", gensym("#X"),gensym("obj"), ! x->x_obj.te_xpix, x->x_obj.te_ypix, gensym("entry"), x->x_width, x->x_height, x->x_bgcolour, x->x_fgcolour); binbuf_addv(b, ";"); }
Index: entry-help.pd =================================================================== RCS file: /cvsroot/pure-data/externals/bbogart/entry/entry-help.pd,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** entry-help.pd 26 Oct 2007 04:49:49 -0000 1.4 --- entry-help.pd 27 Oct 2007 23:50:16 -0000 1.5 *************** *** 13,18 **** #X obj 261 234 select return; #X obj 79 347 pddp/print; ! #X obj 176 163 trigger bang bang; ! #X msg 176 184 clear; #X symbolatom 216 319 10 0 0 1 last_key_typed - -; #X text 266 262 ^-- hit return to output; --- 13,18 ---- #X obj 261 234 select return; #X obj 79 347 pddp/print; ! #X obj 176 173 trigger bang bang; ! #X msg 176 194 clear; #X symbolatom 216 319 10 0 0 1 last_key_typed - -; #X text 266 262 ^-- hit return to output; *************** *** 24,27 **** --- 24,28 ---- save and reopen.; #X msg 169 127 add seven eight nine; + #X msg 196 149 add ten eleven.; #X connect 0 0 2 0; #X connect 0 0 10 0; *************** *** 42,43 **** --- 43,45 ---- #X connect 18 0 0 0; #X connect 20 0 0 0; + #X connect 21 0 0 0;