ftd.calculator #428
amitu
started this conversation in
Ideas & RFCs
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently if we define a variable, x, it's not possible to show the definition of x in a page.
For data often it is desirable to see the data definitions:
And
ftd.calculator
shows these variables and their values side by side.Custom Rendering
Calculator will require two
ftd.ui
elements, one to wrap the entire body, and showcaption
, and other to show individual steps.Since this feature is a language level feature, based on calculator we have to change the parser itself, we can not wrap
ftd.calculator
in other components. So we must provide the customisation as a parameters:We can ensure that extra arguments can be passed as well, eg
foo
.Named Calculator
Calculators can be given names, and then variables defined in them can be accessed from outside:
Including External Definitions
Sometimes a variable may be defined outside the calculator, or in other modules, you can include them as step by using:
Once a variable has been included, it can be modified during calculation steps.
Hiding Steps
A step can be hidden by doing:
ftd.calculator-data
typeStep Delegation
Along with renderer we can also pass
step-renderer
. Ifstep-renderer
is used, the arguments of step renderers can be included in the step definitions.Here we can pass
foo
to definition ofx
becausestep-renderer
ismy-step-renderer
, which acceptsfoo
.Beta Was this translation helpful? Give feedback.
All reactions