Evaluating a String as code -djb

Torge.Husfeldt at gmx.de Torge.Husfeldt at gmx.de
Wed Feb 12 11:29:10 UTC 2003


Hi Derek,

I see you have already have a satisfying answer to your queston.
But depending on what you really want to accomplish you might want
to try CMD-6, do it.

HTH,
Torge

Derek Brans <brans at nerdonawire.com> wrote:
> Thanks for the great responses.
> On Saturday, February 8, 2003, at 03:54 PM, Nevin Pratt wrote:
> 
> >
> > This might be useful to you:
> >
> > HTMLformatter evalEmbedded: ' This is a test of ? | foo | foo := 
 to see if it works ' with: 
> > HttpRequest new
> >
> > Nevin
> >
> >
> > Derek Brans wrote:
> >
> >> Given a string, is there anyway to evaluate its contents as code in 
> >> the current context?
> >>
> >> Essentially I want to write a function that given a string like this:
> >>
> >> ' This is a test of < | foo | foo := self bar. foo upperCase. > to see 
> >> if it works '
> >>
> >> returns a string like this:
> >>
> >> 'This is a test of Something to see if it works'
> >>
> >> Thank you in advance,
> >> Derek
> >>
> >> Nerd on a Wire: Web and Information Solutions
> >> Website Design - Database Systems - Site Hosting
> >> 604.874.6463
> >> mailto:info at nerdonawire.com
> >> For more information, visit http://nerdonawire.com
> >>
> >>
> >>
> >
> >
> >
> >
> >
> Nerd on a Wire: Web and Information Solutions
> Website Design - Database Systems - Site Hosting
> 604.874.6463
> mailto:info at nerdonawire.com
> For more information, visit http://nerdonawire.com



More information about the Squeak-dev mailing list