[plt-scheme] pasteboard% example

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Mon Apr 13 12:22:00 EDT 2009

Also, the module browser and Redex both use a graph library that is
built out of pasteboards.

Robby

On Mon, Apr 13, 2009 at 11:01 AM, Martin DeMello
<martindemello at gmail.com> wrote:
> On Mon, Apr 13, 2009 at 7:55 PM, Todd O'Bryan <toddobryan at gmail.com> wrote:
>> Does anyone have a pointer to an example of how a pasteboard% would be
>> used, either in the PLT codebase or elsewhere?
>
> Here's a minimal example of instantiating a pasteboard% and inserting
> an editor-snip% into it:
>
> #lang scheme
>
> (require mred framework)
>
> (define f (instantiate frame% ("Pasteboard Test" #f 600 400)))
> (define c (instantiate editor-canvas% (f)))
> (define p (instantiate pasteboard% ()))
> (send c set-editor p)
> (send f show #t)
> (define t (instantiate text% ()))
> (define s (instantiate editor-snip% (t)))
> (send t insert "hello pasteboard world" 0)
> (send p insert s)
>
> martin
> _________________________________________________
>  For list-related administrative tasks:
>  http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>


Posted on the users mailing list.