3.5.1 Core
(require conscript/base) | package: conscript |
The bindings provided by this module are also provided by #lang conscript.
syntax
(defstep ...)
syntax
(defstep/study ...)
syntax
(defvar/instance ...)
syntax
(defvar*/instance ...)
syntax
(defview ...)
syntax
(defstudy maybe-requires maybe-provides step-transition ...)
maybe-requires =
| #:requires (value-id-sym ...) maybe-provides =
| #:provides (value-id-sym ...) step-transition = [step --> step maybe-more-steps] maybe-more-steps =
| --> step ...
value-id-sym : symbol?
step : step?
Defines a study.
Any number of steps may be joined by transitions using -->.
procedure
(button [ action-proc] label [ #:id id #:to-step-id to-step-id #:up-target up-target #:up-transition up-transition]) → xexpr? action-proc : (-> any/c) = void label : string? id : string? = "" to-step-id : (or/c identifier? #f) = #f up-target : string? = ".step" up-transition : string? = "none"
If action-proc is provided, it will be called when the button is clicked, just before the next step in the study is loaded.
The href attribute is dynamically set to the URL of a continuation that first calls action with no arguments, then returns the page provided by to-step-id (or that provided by the next step in the study if to-step-id is #f).
If #:id is provided, it sets the value of the data-widget-id attribute for the element.
syntax
(for/study ...)
syntax
(with-bot step-expr bot-expr)
> (require conscript/base)
> (defstep (hello) (button "Continue..."))
> (defstudy s [[hello (with-bot hello bot:continuer)] --> ,(lambda () done)])