[racket] Using define-runtime-path from *SL

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Wed Mar 18 23:17:04 EDT 2015

You probably need to do this:

  (require (for-syntax racket/base))
  (provide (for-syntax #%datum))

in the teachpack.

Robby


On Wed, Mar 18, 2015 at 10:05 PM, Nadeem Abdul Hamid <nadeem at acm.org> wrote:
> Yes, that does work, thanks.
>
> I had put
>   (require racket/runtime-path)
>   (provide define-runtime-path)
> into the teachpack file, but then in an ISL file, doing:
>   (require "the-lib.rkt")
>   (define-runtime-path y "hello world")
> was giving:
> ?: literal data is not allowed;
>  no #%datum syntax transformer is bound in the transformer environment
>
> Anyway, sorry about the noise.
>
>
> On Wed, Mar 18, 2015 at 10:47 AM, Matthias Felleisen <matthias at ccs.neu.edu>
> wrote:
>>
>>
>> Are you sure? I had a drracket open in ISL and here is what I got:
>>
>> > Welcome to DrRacket, version 6.1.1.8--2015-03-11(-/f) [3m].
>> > Language: Intermediate Student with lambda.
>> > > (require racket/runtime-path)
>> > > (define-runtime-path y "hello world")
>> > >
>>
>>
>>
>> -- Matthias
>>
>>
>>
>>
>> On Mar 18, 2015, at 9:46 AM, Nadeem Abdul Hamid <nadeem at acm.org> wrote:
>>
>> > How can I use define-runtime-path from *SL? I have a little teachpack
>> > that exports the play-sound/play-background-sound functions so students can
>> > use that in a game, but when you create an executable the sound files are
>> > not packaged up. I figured that define-runtime-path needs to be used for
>> > that, but exporting that from the teachpack gives an error when you try to
>> > use it from a *SL program.
>> >
>> > --- nadeem
>> >
>> >
>> >
>> >
>> > ____________________
>> >  Racket Users list:
>> >  http://lists.racket-lang.org/users
>>
>
>
> ____________________
>   Racket Users list:
>   http://lists.racket-lang.org/users
>

Posted on the users mailing list.