[Newbies] fromString: method

Davide Arrigo davide.arrigo at gmail.com
Sat May 24 10:47:45 UTC 2008


Hy all, I worder if there's something like this: Block fromString:
aString in Squeak, like the example below taken from SmallTalk/X
programmers guide.

|s b|

    s := '[:a :b | (a squared + b squared) sqrt ]'.
    b := (Block fromString:s).
    Transcript showCR:(b value:3 value:4)

I need to get a Block of code from an input field  like TextMorph in a
GUI. I haven't found nothing like this in my squeak-dev image 3.10. Is
there another way to obtain am evaluable Block of code from a string?
Many thanks
-- 
--------------------------
Davide Arrigo


More information about the Beginners mailing list