If I create a text string which contains squeak code, how can I execute it from within a script?

Steve Thomas <sthomas1-gQhbkF4bah9Wk0Htik3J/[email protected]>
Newsgroups gmane.comp.lang.smalltalk.squeak.squeakland
Message-ID <CAGa9PAax1Ld=QLPK0RJ0damKkpsg-Y2dyBF7u8Vd3MuuRa58=Q@mail.gmail.com>
Folks,

I am trying to create a project where kids can enter their own "Connector"
functions.

So what I want to do is given a connector connected to two text boxes (one
Enhanced Text, so I can execute a script when they hit <CR> or on <focus
loss>).
I have a string variable defined for the connector, in which the kids can
enter a function like ( D = S + 25)
Where D maps to DestinationPlayer and S maps to SourcePlayer.

Ideally I would like to generate the below script and execute it:

doIt
self getDestinationPlayer setNumericValue: self getSourcePlayer
getNumericValue + 25



Need some squeak coding help on this.  I guess specifically, assuming I can
figure out how to create a string with the correct code ...
How do I "do it" to the string?

Thanks,
Stephen

_______________________________________________
squeakland mailing list
[email protected]
http://lists.squeakland.org/mailman/listinfo/squeakland
ConnectorMath.001.pr (application/octet-stream, 92.4 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.