[PD] [gem] printing numbers
mdanks at Stormfront.com
Thu May 17 02:39:11 CEST 2001
Well, there really isn't a good reason...except for some legacy.
The GEM text objects used to parse their own messages which came in to
generate strings (in fact, they used to only accept one string).
Miller added atom_string() which converted any message into a
string...including floats. This is what the text objects use now.
However, at the top of the function TextBase::textMess(), there is a check
to make sure that the first argument in the message is a SYMBOL (ie, just a
string). This really isn't needed anymore, but it is what is preventing you
from doing what you want.
There probably is some way to convert a number into a string, but I don't
know if off the top of my head.
Work arounds are:
1) do --> text "123"
: but then you will have quotes
2) do --> text foo 123
: but then you will have the string foo in front of your number
3) change TextBase and recompile the code
: but you would need to have a compiler
4) wait for me to release a new version of GEM
: but I am going off to E3 in LA, so it won't happen until early next week
Sorry about that!
= mdanks at stormfront.com
= Lead Programmer PS2
> -----Original Message-----
> From: Thomas Grill [mailto:t.grill at gmx.net]
> Sent: Wednesday, May 16, 2001 10:54 AM
> To: PD list
> Subject: [PD] [gem] printing numbers
> Hi list, i'm stuck at a simple problem:
> how can i output numbers using the text2d object?
> When i send it a "text 123" message, i get the error message
> "GEM: Textbase:
> wrong type", just because the number is not a symbol.
> So... how?
> thanks, Thomas
More information about the Pd-list