[plt-scheme] enhancing the drscheme editor & GUIBuilder

From: Corey Sweeney (corey.sweeney at gmail.com)
Date: Mon Sep 13 12:24:38 EDT 2004

I decided to try to enhance GUIBuilder a little bit today, but am
having some trouble figuring out how it works.

My first objective was to find how to add my own item to the special
menu, that would just do something simple like insert a text string or
so, so that i'd be able to start probing the environment for how to
construct my new idea.

I've found it adds the "Insert GUI" to the special menu via 
(make-object menu-item% "Insert GUI" (get-special-menu)...)

but trying to make my own insertion object attempt dosn't work:

(make-object menu-item% "Insert hoopty" (get-special-menu) (lambda (a
b) "hoopty"))

reports unknown "get-special-menu".  I looked it up in the help and
help said i needed to write it like this:

(send a-drscheme:unit:frame get-special-menu)

but when i try it, it reports "a-drscheme:unit:frame not found".   

so since we don't have apropos, or tab completion in drscheme, i typed
(interact-environment) in hopes to grep the namespace.  but i got back
#<namespace> which i didn't know how to grep.

now the man page for get-special-menu dosn't mention needing any
required .ss files, so i loaded tool.ss and clicked run before typing
them in, so all the guibuilder libs would be loaded in the interactive
environment.  I also whipped the commands into guilbuider.ss then
clicked run, and it did not seem to update the menu at all.

So i'm stumped on this.  Any help?

My other objective was to figure out how GUIBuilder actually does it's
thing.  Originally i had thought GUIBuilder was cheating was rewriting
drscheme chunks and just linking them in, but then i found out
yesterday that plt has support for extending the external
represenations.  Is this How GUIBuilder is adding the display objects
to the editor?  All I could find was a "insert-format-handler" in
guibuilder.ss, but from the calls description, it seemed more like a
mime type for files, then a display type for objects.


P.S.  Is anyone else having problems cutting from drscheme and pasting
to another window (a email client window, for example) on v208

P.S.S  Anyone want a gmail account?  I have some invitations

Posted on the users mailing list.