Skip to content

Runtime binding options #535

Open
Open
@andrewfstratton

Description

@andrewfstratton

Parameters can be bound at 3 different points:

  1. Generation parameters are in the script - produce by javascript (generator.js) substitutions from go defined block definition of widgets
  2. Early runtime - this is run once only when setting up the api call. e.g. a constant text to be shown or filename
  3. Late runtime - this may be updated every invocation, e.g. val/txt parameters

Late runtime:

  • must be only a variable, with =[a..Z][a..Z_.]*
  • widget type is defined already - so variable type lookup is implicit?!

Simple option:

  • separate the late runtime parameters into an overriding list of parameter=source mappings
    • i.e. mappings are split into early and late binding, e.g. media.say({early},{late})
      • e.g. media.say(speed#100,voice"female",interrupt!false,txt=txt,pitch=val)
  • Note:
    -pitch widget would have a class to allow variables with number type to be dragged in.
    • txt widget would allow string variable to be dragged in

Callbacks is by using boxinput widget

A more complex example, picking at random a response, would also be a group reference, e.g.

1 pick.random(Reorder!true,Box:2)

2 media.say(Txt"Hi")
3 media.say(Txt"Hello")
4 media.say(Txt"G'day")

N.B. pick.random (Go) will reference a group array of [2,3,4] and pick randomly in that array at runtime

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions