[racket] Embedding DrRacket

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Wed Nov 3 07:33:44 EDT 2010

I think I misunderstood your original query.

You can't change the parent, but you can tell a parent not to show a
child by calling the change-children method. Something like this in
your code:

(send frame change-children (lambda (l) (remq vertical-panel-editor l)))

Robby

On Wed, Nov 3, 2010 at 5:00 AM, Jukka Tuominen
<jukka.tuominen at finndesign.fi> wrote:
>
> Thanks Robby,
>
> I'll look into your suggestion. I'm still hesitating whether I will manage with my very limited skills to gather all pieces one by one, and have them actually working smoothly with each other Like DrRacket does. This is very uncertain terrain to me. Preferably, I had something I could just place between two panels and change the parent to point to one level up. And it should run inside a lambda, not leaving any assignments behind. Something like this:
>
>
> ((lambda ()
>
>   (define frame
>     (new frame%
>      (parent #f)
>      (label "Embedded Editor")
>      (border 5)
>      (min-width 400)
>      (min-height 225)))
>
>   (define vertical-panel-top
>     (new vertical-panel%
>      (parent frame)
>      (style '(border))))
>
>   ;; Replace the following definition
>   (define vertical-panel-editor
>     (new vertical-panel%
>      (parent frame)
>      (style '(border))))
>
>   (define vertical-panel-bottom
>     (new vertical-panel%
>      (parent frame)
>      (style '(border))))
>
>   (send frame show #t)))
>
>
> Is there any solution to this, you could think of?
>
>
> br, jukka
>
>
>> -----Original Message-----
>> From: robby.findler at gmail.com [mailto:robby.findler at gmail.com]On Behalf
>> Of Robby Findler
>> Sent: 03 November 2010 02:10
>> To: Jukka Tuominen
>> Cc: users at racket-lang.org
>> Subject: Re: [racket] Embedding DrRacket
>>
>>
>> Try just using frame:standard-menus% in place of frame%. You will need
>> to change the parents of any panels you create from the frame to the
>> result of calling the get-area-container method (you'll get an error
>> that points you in the right direction).
>>
>> That may not be exactly all of the right menus, but hopefully that'll
>> get you started.
>>
>> Robby
>>
>> On Tue, Nov 2, 2010 at 6:25 PM, Jukka Tuominen
>> <jukka.tuominen at finndesign.fi> wrote:
>> >
>> > Hi,
>> >
>> > I have made a lambda function that draws a frame with several
>> panels. Now,
>> > I've been trying to figure out how to embed DrRacket's GUI/functionality
>> > inside one of these panels, so I could show/hide it as needed. The way
>> > DrRacket gathers all bits and mixins in the initializing process, seems
>> > overwhelming to me (I'm not a programmer). I managed to get a simple
>> > scheme:text% editor working, which does some of the things I need, but I
>> > really need fully functional IDE in order to avoid constant copy/pasting
>> > between this app and DrRacket.
>> >
>> > As far as I have understood, the menus require frame as their
>> parent, but is
>> > there a way to create a bundle of some kind I could just give a
>> panel as a
>> > parent?
>> >
>> > Any help is greatly appreciated.
>> >
>> > br, jukka
>> >
>> >
>> > |  J U K K A   T U O M I N E N
>> > |  m a n a g i n g   d i r e c t o r  M. A.
>> > |
>> > |  Finndesign  Kauppiaankatu 13, FI-00160 Helsinki, Finland
>> > |  mobile +358 50 5666290
>> > |  jukka.tuominen at finndesign.fi  www.finndesign.fi
>> >
>> >
>> > _________________________________________________
>> >  For list-related administrative tasks:
>> >  http://lists.racket-lang.org/listinfo/users
>> >
>>
>
> _________________________________________________
>  For list-related administrative tasks:
>  http://lists.racket-lang.org/listinfo/users
>


Posted on the users mailing list.