[plt-scheme] Registering a new snip type

From: Jordan Johnson (jmj at fellowhuman.com)
Date: Sat Aug 15 18:25:31 EDT 2009

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:
	1) create an "Insert" menu item for inserting an empty annotated  
expression snip
	2) create a "Scheme" menu item for annotating a chosen expression (as  
I do in the demo)
	3) create similar items in the right-mouse-button context menu for  
the Definitions editor
	4) ensure that it's evaluated as an ordinary expression in its place  
would be

If someone could explain where I should be hooking in for these (or  
point me to docs I might be missing), I would appreciate it.

So far, I've added my module to my copy of drscheme/private/eval.ss,  
and have been looking at drscheme/private/unit.ss, collects/xml/text- 
box.ss, and collects/framework/{scheme,comment-box}.ss as models.  The  
snip code itself is attached.

Many thanks,
jmj

-------------- next part --------------
A non-text attachment was scrubbed...
Name: code-desc-snip.ss
Type: application/octet-stream
Size: 23282 bytes
Desc: not available
URL: <http://lists.racket-lang.org/users/archive/attachments/20090815/b80ac77c/attachment.obj>
-------------- next part --------------




Posted on the users mailing list.