On Thu, Aug 20, 2020 at 9:11 AM Deren Dohoda <deren.doh...@gmail.com> wrote:

> I would kill to understand the intended use of the framework library. I
> don't understand what I'm supposed to do with it at all. Does anyone have
> an application written with framework that I can look at? Or could we make
> a small template with some framework features like autosave which are quite
> unique to framework over racket/gui? I feel very stupid asking but my
> desire to try it has exceeded my embarrassment in this regard.
>

The framework is intended to be a collection of mixins that provide useful
functionality in a variety of ways that someone building an app might want.
That said, I agree the documentation could really use some help with
introductory material and some examples and ... I don't know what. So if
people have energy to work on how to do that, I would be delighted.

Here's an example of the kind of thing I'm talking about. This is just
using racket/gui classes:

#lang racket/gui
(define f (new frame% [label ""] [width 200] [height 200]))
(define t (new text%))
(send t insert "#lang racket\n(define (f x)\n  (expt x x))\n")
(define ec (new editor-canvas% [parent f] [editor t]))
(send f show #t)

but we can add a stuff from the framework, say, like this (to get
search/replace to work):

#lang racket/gui
(require framework)
(define f (new frame:searchable% [width 600] [height 800]))
(define t (send f get-editor))
(send t insert "#lang racket\n(define (f x)\n  (expt x x))\n")
(send f show #t)

If we change the editor class that gets created we can get syntax
highlighting based on the #lang-line

#lang racket/gui
(require framework)
(define f%
  (class frame:searchable%
    (define/override (get-editor%)
      (text:searching-mixin
       racket:text%))
    (super-new)))
(define f (new f% [width 600] [height 800]))
(define t (send f get-editor))
(send t insert "#lang racket\n(define (f x)\n  (expt x x))\n")
(send f show #t)

I've tried to make the framework library's mixins and classes at least
theoretically, be plausibly useful things outside of DrRacket but yes, the
framework and DrRacket have certainly grown together with each other.
Matthew Flatt started them in 1993? 4? and I've been slowly acreeting stuff
into them since (with help from many others, of course!)

Robby

On Thu, Aug 20, 2020 at 9:46 AM Laurent <laurent.ors...@gmail.com> wrote:

> My understanding is that Framework is born out of DrRacket, expecting that
> some of its tools may be useful in other contexts (like, say, keymaps).
>
>
> On Thu, Aug 20, 2020 at 3:11 PM Deren Dohoda <deren.doh...@gmail.com>
> wrote:
>
>> > I think Racket would benefit by a suite of applications which are small
>> but
>> > not trivial and with a source code which is commented in more detail
>> than a
>> > regular application
>> I would kill to understand the intended use of the framework library. I
>> don't understand what I'm supposed to do with it at all. Does anyone have
>> an application written with framework that I can look at? Or could we make
>> a small template with some framework features like autosave which are quite
>> unique to framework over racket/gui? I feel very stupid asking but my
>> desire to try it has exceeded my embarrassment in this regard.
>>
>> Deren
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Racket Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to racket-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/racket-users/c754b4a3-9073-4ecd-9815-7491ad96cf89n%40googlegroups.com
>> <https://groups.google.com/d/msgid/racket-users/c754b4a3-9073-4ecd-9815-7491ad96cf89n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to racket-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/racket-users/CABNTSaGAHqYPKtU-dTnOQ5ZNO0tMWuTgrRW8w8o2iNeZc7bEYg%40mail.gmail.com
> <https://groups.google.com/d/msgid/racket-users/CABNTSaGAHqYPKtU-dTnOQ5ZNO0tMWuTgrRW8w8o2iNeZc7bEYg%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CAL3TdOMvNSdayRKiU7dpjP-395Jdwuf4j2FUkK3h%3D3e6NCSxqQ%40mail.gmail.com.

Reply via email to