[plt-scheme] Registering a new snip type

From: Jordan Johnson (jmj at fellowhuman.com)
Date: Sun Aug 16 23:50:40 EDT 2009

Excellent -- this should give me enough to go on. Thanks, Robby. --jmj

On Aug 15, 2009, at 8:29 PM, Robby Findler wrote:

> On Sat, Aug 15, 2009 at 5:25 PM, Jordan Johnson<jmj at fellowhuman.com>  
> wrote:
>> Hi all,
>>
>> I've been continuing my work on a snip to represent annotated code,  
>> and am
>> now at the point of needing to integrate it with DrScheme.  (I'd  
>> like to
>> test it -- in conjunction with Stephen Bloch's "inventory" approach  
>> -- with
>> one of my classes this fall.)  I've got a brief (2min) demo online  
>> here:
>>        http://www.fellowhuman.com/scheme/anno-snip-demo.swf
>>
>> I'd like to do the following:
>
> For all of these, you need to create a tool that adds mixins to
> DrScheme. See the plugins manual for how to do this (and ask here if
> you get stuck).
>
>>        1) create an "Insert" menu item for inserting an empty  
>> annotated
>> expression snip
>
> Use the "get-insert-menu" method to get the menu and add something  
> to it.
>
>>        2) create a "Scheme" menu item for annotating a chosen  
>> expression (as
>> I do in the demo)
>
> The get-language-menu method.
>
>>        3) create similar items in the right-mouse-button context  
>> menu for
>> the Definitions editor
>
> See keymap:add-to-right-button-menu.
>
>>        4) ensure that it's evaluated as an ordinary expression in  
>> its place
>> would be
>
> The snip needs to implement the readable-snip<%> interface. This is
> not drscheme, but mred level (ie, this will work outside of drscheme).
>
> Robby



Posted on the users mailing list.