hi gem-devs,
accessing the symbol directly makes sure that atom_string doesn't mess with the symbols ... i think it's the cleanest way to display symbols containing commas:
--- Base/TextBase.cpp 11 Sep 2005 16:02:23 -0000 1.17 +++ Base/TextBase.cpp 20 Sep 2005 22:54:52 -0000 @@ -336,15 +336,14 @@ if ( argc < 1 ) {return; }
string line = ""; - char newtext[MAXPDSTRING]; - + int i=0;
// convert the atom-list into 1 string for (i = 0; i < argc; ++i) { - atom_string(&argv[i], newtext, MAXPDSTRING); - line += newtext; + string newtext = atom_getsymbol(&argv[i])->s_name; + line += newtext; if(argc-1>i)line += " "; }
would be great, if you could commit the patch ...
thanks ... tim
Tim Blechmann wrote:
hi gem-devs,
accessing the symbol directly makes sure that atom_string doesn't mess with the symbols ... i think it's the cleanest way to display symbols containing commas:
yep (although i am not sure whether atom_string should escape all the pd-special characters in the first place)
would be great, if you could commit the patch ...
done
Hallo Tim, IOhannes!
The problem with the patch is, that all float are now displayed as "float" ... so heres the next patch:
in TextBase::textMess:
... char tmp_char[MAXPDSTRING]; string newtext; ...
and then read it like this:
... if(argv[i].a_type == A_FLOAT) { atom_string(&argv[i], tmp_char, MAXPDSTRING); newtext = tmp_char; } else newtext = atom_getsymbol(&argv[i])->s_name; ...
So commas and floats are possible !
LG Georg
The problem with the patch is, that all float are now displayed as "float" ... so heres the next patch:
oh right .... maybe it's also a good idea to fix atom_string ...
cheers ... tim
Tim Blechmann wrote:
The problem with the patch is, that all float are now displayed as "float" ... so heres the next patch:
oh right .... maybe it's also a good idea to fix atom_string ...
well, anyhow; i have it on my disk now but i cannot commit it to the CVS. is sf down ?
mfg.adsr IOhannes