[plt-scheme] enhancing the drscheme editor & GUIBuilder

From: ifconfig nslookup (configurator at gmail.com)
Date: Mon Sep 13 12:41:28 EDT 2004

You must be familiar with class.ss to understand this.
I assume the command (make-object menu-item% "Insert GUI"
(get-special-menu)...) is from within an function in
drscheme:unit:frame, which is probably some class or other type.
What you need to do is indeed (send a-drscheme:unit:frame
get-special-menu). But this is an example of the usage of
get-special-menu. It requires that a-drscheme:unit:frame be replaced
with an actual instance of drscheme:unit:frame.
To get that instance of drscheme:unit:frame, there is most probably
some function ou need to call, but I don't know that far in it. I'm
sure someone else will be happy to fill in that detail.

Good luck,
ifconfig.


On Mon, 13 Sep 2004 11:24:38 -0500, Corey Sweeney
<corey.sweeney at gmail.com> wrote:
>  For list-related administrative tasks:
>  http://list.cs.brown.edu/mailman/listinfo/plt-scheme
> 
> 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.
> 
> Corey
> 
> P.S.  Is anyone else having problems cutting from drscheme and pasting
> to another window (a email client window, for example) on v208
> linux/gnome?
> 
> P.S.S  Anyone want a gmail account?  I have some invitations
>


Posted on the users mailing list.