Hi Steve, 

From a script of the text object you can write:

Compiler evaluate: self getCharacters.

and if the text contains a valid smalltalk expression it will work, otherwise it will throw an error. I don't remember exactly how to catch syntax errors, though. I did it for the spreadsheet object last year, but I wasn't sure if that's the right way.

As for the format, I have no idea. Sorry.

Cheers,
Richo

On Wed, Mar 30, 2011 at 6:06 PM, Steve Thomas <sthomas1@gosargon.com> wrote:
So if I have a Text Object with the "characters" value: (5 + 2) / 2
How can I set the numeric value of another text object (or any variable of Type Number) to the "evaluated" value?

Ie: how can I set the value to the equivalent of <CMD-P>?
Also how can I specify the format as either "7/2" or 3.5?

Thanks,
Stephen

_______________________________________________
squeakland mailing list
squeakland@squeakland.org
http://lists.squeakland.org/mailman/listinfo/squeakland