[racket] Using a splash screen with GRacket

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Wed Sep 1 14:27:52 EDT 2010

Oh, right. That was a pretty big oversight, wasn't it! I've pushed
docs for that library.

Thanks,
Robby

On Wed, Sep 1, 2010 at 8:30 AM, Laurent <laurent.orseau at gmail.com> wrote:
> Wow, that is even better than that!
> Digging a bit further, it uses the framework/splash module,
> which does everything I wanted (and more), even with the gauge
> that progresses automatically, and it works like a charm out of the box!
> Awesome.
>
> And it is so simple to use:
>
> <<<
> #lang racket/base
>
> (require racket/runtime-path
>          (for-syntax racket/base) ; for build-path for runtime-path
>          framework/splash
>          )
>
> (define-runtime-path splash-path
>   (build-path "img" "splash.png"))
>
> (start-splash splash-path "My Project" 200) ; frame name, default width
>
> (dynamic-require "my-project.rkt" #f)
>
> (shutdown-splash)
> (close-splash)
>>>>
>
> (no need for runtime-path if the application is not
> intended for distribution)
>
> Maybe this could be documented?
>
>
>
>
> On Wed, Sep 1, 2010 at 14:16, Robby Findler <robby at eecs.northwestern.edu>
> wrote:
>>
>> collects/drracket/drracket.rkt does something similar to set up
>> compilation handlers and (optionally) a profiler that I use for
>> performance debugging, and then it loads
>> drracket/private/drracket-normal.rkt which does the splash screen bit.
>>
>> Robby
>>
>> On Wed, Sep 1, 2010 at 7:11 AM, Laurent <laurent.orseau at gmail.com> wrote:
>> > Excellent! Thanks a lot!
>> > By any chance, do you remember the name of the file that does that?
>> > (Don't take more than 10s for this question, it's not worth it.)
>> >
>> > On Wed, Sep 1, 2010 at 14:00, Robby Findler
>> > <robby at eecs.northwestern.edu>
>> > wrote:
>> >>
>> >> A minimal amount of stuff is loaded (roughly what is loaded when
>> >> gracket itself starts up) and then the splash screen is opened and the
>> >> rest of drracket is loaded via a dynamic-require. Also, progress on
>> >> the splash screen's gauge% is made each time a file is loaded, which
>> >> is monitored by the load-handler.
>> >>
>> >> Robby
>> >>
>> >> On Wed, Sep 1, 2010 at 1:56 AM, Laurent <laurent.orseau at gmail.com>
>> >> wrote:
>> >> > Hi,
>> >> >
>> >> > Is it possible to have a splash screen displayed while loading a
>> >> > GRacket
>> >> > program?
>> >> > Much like DrRacket's in fact.
>> >> > Because for some projects, it can take several seconds to initialize
>> >> > everything.
>> >> > I tried to open up a frame at the very beginning of the code, but it
>> >> > only
>> >> > shows up
>> >> > after everything is loaded too.
>> >> >
>> >> > How is DrRacket splash screen shown up so early, while DrRacket is
>> >> > loading?
>> >> >
>> >> > Thanks,
>> >> > Laurent
>> >> >
>> >> > _________________________________________________
>> >> >  For list-related administrative tasks:
>> >> >  http://lists.racket-lang.org/listinfo/users
>> >> >
>> >
>> >
>
>


Posted on the users mailing list.