I was too quick to respond, the #storeString conversion is OK:

(#( $f $o $o $' $b $a $r) as: String) storeString collect: [ :each | each ] as: 
Array. 

=> #($' $f $o $o $' $' $b $a $r $')

The contract of #storeString is, given a String (well any object), what should 
it look like when written as a literal constant in source code. That is 
precisely what you want, no ?

but you have to drop adding your own quotes, like

stream << 'description' << Character cr
<< Character tab << $^ << dialog description string storeString.

or even (as #printOn: is the same as #storeOn: for String)

stream << 'description' << Character cr
<< Character tab << $^ print: dialog description string.

And I would turn this into a cascade, but that is more coding style.

stream 
  << 'description'; cr; 
  tab; nextPut: $^; print: dialog description string.

> On 13 Nov 2014, at 18:26, Hilaire <[email protected]> wrote:
> 
> Le 13/11/2014 18:05, Sven Van Caekenberghe a écrit :
>> I think you need to send #storeString to the result of 'dialog description 
>> string'. The single quote has to be doubled.
> 
> Yep, I realized it is not double quoted.
> I used this message copyWithRegex: '''' matchesReplacedWith:  ''''''
> 
> However both #storeString or #printString messages can't do the job.
> 
> 'n''a pas l''e'  storeString
> -> '''n''''a pas l''''e'''
> 
> ('n''a pas l''e'copyWithRegex: '''' matchesReplacedWith:  '''''')
> -> 'n''''a pas l''''e'
> 
> 
> #storeString seems to mess up with the quote, adding superfluous one.
> Strange?
> 
> -- 
> Dr. Geo - http://drgeo.eu
> iStoa - http://istoa.drgeo.eu
> 
> 


Reply via email to