[plt-scheme] nesting editors?

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Mon May 22 10:16:01 EDT 2006

At Mon, 22 May 2006 10:05:16 -0400, David Richards wrote:
> 
> How do I nest text editors.  This doesn't work.
> 
> 
> (define f (instantiate frame% ("Simple Edit" #f 200 200)))
> (define c (instantiate editor-canvas% (f)))
> (define t (instantiate text% ()))
> (define t2 (instantiate text% ()))
> (send c set-editor t)
> (send f show #t)
> 
> (send t insert "test")
> (send t2 insert "ing")
> (send t insert t2)

For the last line, use

 (send t insert (make-object editor-snip% t2))


Matthew



Posted on the users mailing list.