I think you need to send #storeString to the result of 'dialog description 
string'. The single quote has to be doubled.

> On 13 Nov 2014, at 17:50, Hilaire <[email protected]> wrote:
> 
> Hello,
> 
> I get an error (see screenshot) when I compile at runtime a method where
> a quote is found in its body.
> 
> I expect this compiled method:
> 
> description
> ^ 'n''a pas sa force'
> 
> 
> The user inputs part of this method as: n'a pas sa force
> In its string representation, it is displayed as: n''a pas sa force
> with the quote correctly escaped. But compiling fail.
> 
> 
> I use this code to compile at runtime:
> 
> stream := WriteStream on: String new.
> stream << 'description' << Character cr
> << Character tab << $^ <<$' << dialog description string << $'.
> scriptClass class compile: stream contents classified: 'public'.
> 
> 
> 
> -- 
> Dr. Geo - http://drgeo.eu
> iStoa - http://istoa.drgeo.eu
> <Syntax Error: End of statement list encountered.png>


Reply via email to