On Monday, June 27, 2016 at 3:03:27 PM UTC+8, Normal Loone wrote:
> Hello,
> 
> I currently want to write a program that includes writing out stuff written 
> in the buffer. But I cant seem to write out strings stored in text% properly.
> Example:
> 
> (define txt (new text%))
> (send txt insert "hello world" 0 11)
> (send txt find-first-snip)
> 
> creates "hello world" on the command line.
> 
> But neither 
> (write-to-file (send txt find-first-snip) path)
> 
> (define fdatei (open-output-file path))
> (write (send txt find-first-snip) fdatei)

try:

    (write (send txt get-flattened-text) fdatei)

Alex.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to