brought the tool docs up to date with the new names in the info.rkt files
This commit is contained in:
parent
ac69f11a58
commit
53b9b8adba
|
@ -65,50 +65,49 @@ When DrRacket starts up, it looks for tools by reading
|
||||||
fields in the @File{info.rkt} file of each collection and the
|
fields in the @File{info.rkt} file of each collection and the
|
||||||
newest version of each PLaneT package installed on the
|
newest version of each PLaneT package installed on the
|
||||||
system. (Technically, DrRacket looks in a cache of the
|
system. (Technically, DrRacket looks in a cache of the
|
||||||
@filepath{info.rkt} files contents created by setup-plt. Be sure to
|
@filepath{info.rkt} files contents created by @tt{raco setup}. Be sure to
|
||||||
re-run setup-plt if you change the contents of
|
re-run @tt{raco setup} if you change the contents of
|
||||||
the @File{info.rkt} files). DrRacket checks for these
|
the @File{info.rkt} files). DrRacket checks for these
|
||||||
fields:
|
fields:
|
||||||
@itemize[
|
@itemize[
|
||||||
@item/cap[tools]{
|
@item/cap[drracket-tools]{
|
||||||
@scheme[(listof (listof string[subcollection-name]))]
|
@scheme[(listof (listof string[subcollection-name]))]
|
||||||
}
|
}
|
||||||
@item/cap[tool-names]{@scheme[(listof (union #f string))]}
|
@item/cap[drracket-tool-names]{@scheme[(listof (or/c #f string))]}
|
||||||
@item/cap[tool-icons]{
|
@item/cap[drracket-tool-icons]{
|
||||||
@schemeblock[
|
@schemeblock[(listof (or/c #f
|
||||||
(listof (union #f
|
|
||||||
string[relative-pathname]
|
string[relative-pathname]
|
||||||
(cons string[filename]
|
(cons string[filename]
|
||||||
(listof string[collection-name]))))]
|
(listof string[collection-name]))))]
|
||||||
}
|
}
|
||||||
@item/cap[tool-urls]{
|
@item/cap[drracket-tool-urls]{
|
||||||
@scheme[(listof (union #f string[url]))]
|
@scheme[(listof (or/c #f string[url]))]
|
||||||
}]
|
}]
|
||||||
|
|
||||||
The @scheme[tools] field names a list of tools in this
|
The @scheme[drracket-tools] field names a list of tools in this
|
||||||
collection. Each tool is specified as a collection path,
|
collection. Each tool is specified as a collection path,
|
||||||
relative to the collection where the @File{info.rkt} file
|
relative to the collection where the @File{info.rkt} file
|
||||||
resides. As an example, if there is only one tool named
|
resides. As an example, if there is only one tool named
|
||||||
@File{tool.rkt}, this suffices:
|
@File{tool.rkt}, this suffices:
|
||||||
@schemeblock[
|
@schemeblock[
|
||||||
(define tools (list (list "tool.rkt")))
|
(define drracket-tools (list (list "tool.rkt")))
|
||||||
]
|
]
|
||||||
If the @scheme[tool-icons] or @scheme[tool-names] fields are
|
If the @scheme[drracket-tool-icons] or @scheme[drracket-tool-names] fields are
|
||||||
present, they must be the same length as @scheme[tools]. The
|
present, they must be the same length as @scheme[drracket-tools]. The
|
||||||
@scheme[tool-icons] specifies the path to an icon for each
|
@scheme[drracket-tool-icons] field specifies the path to an icon for each
|
||||||
tool and the name of each tool. If it is @scheme[#f], no
|
tool and the name of each tool. If it is @scheme[#f], no
|
||||||
tool is shown. If it is a relative pathname, it must refer
|
tool is shown. If it is a relative pathname, it must refer
|
||||||
to a bitmap and if it is a list of strings, it is treated
|
to a bitmap and if it is a list of strings, it is treated
|
||||||
the same as the arguments to @scheme[lib], inside
|
the same as the arguments to @scheme[lib], inside
|
||||||
@scheme[require].
|
@scheme[require].
|
||||||
|
|
||||||
This bitmap and the name show up in the about box, Help
|
This bitmap and the name show up in the about box, the
|
||||||
Desk's bug report form, and the splash screen as the tool is
|
bug report form, and the splash screen as the tool is
|
||||||
loaded at DrRacket's startup.
|
loaded at DrRacket's startup.
|
||||||
|
|
||||||
@index{phase1}
|
@index{phase1}
|
||||||
@index{phase2}
|
@index{phase2}
|
||||||
Each of @scheme[tools] files must contain a module that
|
Each of the @scheme[drracket-tools] files must contain a module that
|
||||||
@scheme[provide]s @scheme[tool@], which must be bound to a
|
@scheme[provide]s @scheme[tool@], which must be bound to a
|
||||||
@scheme[unit]. The unit
|
@scheme[unit]. The unit
|
||||||
must import the @scheme[drracket:tool^] signature, which is
|
must import the @scheme[drracket:tool^] signature, which is
|
||||||
|
@ -161,8 +160,8 @@ For example, if the @File{info.rkt} file in a collection
|
||||||
contains:
|
contains:
|
||||||
@schememod[
|
@schememod[
|
||||||
setup/infotab
|
setup/infotab
|
||||||
(define name "Tool Name")
|
(define drracket-name "Tool Name")
|
||||||
(define tools (list (list "tool.rkt")))
|
(define drracket-tools (list (list "tool.rkt")))
|
||||||
]
|
]
|
||||||
then the same collection would be expected to contain a
|
then the same collection would be expected to contain a
|
||||||
@File{tool.rkt} file. It might contain something like this:
|
@File{tool.rkt} file. It might contain something like this:
|
||||||
|
@ -189,12 +188,14 @@ functions have been called.
|
||||||
|
|
||||||
@subsection{Adding Module-based Languages to DrRacket}
|
@subsection{Adding Module-based Languages to DrRacket}
|
||||||
If a language can be implemented as a module
|
If a language can be implemented as a module
|
||||||
(see @scheme[module] for details)
|
(see @scheme[module] for details), then the simplest and
|
||||||
and the standard language settings are
|
best way to use the language is via the ``Use the language
|
||||||
sufficient, simply create an
|
declared the in source'' checkbox in the @onscreen{Language} dialog.
|
||||||
@File{info.rkt} file in the collection
|
|
||||||
where the module is saved. Include these
|
For backwards compatibility, DrRacket also supports
|
||||||
definitions:
|
and
|
||||||
|
@File{info.rkt} file-based method for specifying
|
||||||
|
such languages. Include these definitions:
|
||||||
@itemize[
|
@itemize[
|
||||||
@item/cap[drscheme-language-modules]{
|
@item/cap[drscheme-language-modules]{
|
||||||
This must be bound to a
|
This must be bound to a
|
||||||
|
@ -397,7 +398,7 @@ Each of the names:
|
||||||
@item{@scheme[drracket:get/extend:extend-unit-frame]}
|
@item{@scheme[drracket:get/extend:extend-unit-frame]}
|
||||||
@item{@scheme[drracket:get/extend:extend-tab]}]
|
@item{@scheme[drracket:get/extend:extend-tab]}]
|
||||||
is bound to an extender function. In order to change the
|
is bound to an extender function. In order to change the
|
||||||
behavior of drscheme, you can derive new classes from the
|
behavior of DrRacket, you can derive new classes from the
|
||||||
standard classes for the frame, texts, canvases. Each
|
standard classes for the frame, texts, canvases. Each
|
||||||
extender accepts a function as input. The function it
|
extender accepts a function as input. The function it
|
||||||
accepts must take a class as it's argument and return a
|
accepts must take a class as it's argument and return a
|
||||||
|
|
Loading…
Reference in New Issue
Block a user