Currently, my `lang/reader.rkt` file uses #lang s-exp syntax/module-reader:
#lang s-exp syntax/module-reader
hypothetical-lang
#:read read
#:read-syntax read-syntax
#:info make-info
(define (make-info key default use-default)
(case key
[(drracket:toolbar-buttons)
(list (dynamic-requir
In your `get-info` function for your #lang, if `ip` is the input port passed as
the first argument to `get-info`, then you can get the current document
filename like so:
(send (object-name ip) get-filename)
And pass it as an argument to your button function.
> On Jun 25, 2019, at 1:10 PM, Ksh
I'm trying to make a language-specific toolbar button that when clicked
prints the path of the file the button is clicked from. I've been able to
set up the button, but how I don't know how to access the path of the
current file.
I've basically got two different files, let's call them button.rk
3 matches
Mail list logo