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
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
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.calculatorshows these variables and their values side by side.Custom Rendering
Calculator will require two
ftd.uielements, 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.calculatorin 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-datatypeStep Delegation
Along with renderer we can also pass
step-renderer. Ifstep-rendereris used, the arguments of step renderers can be included in the step definitions.Here we can pass
footo definition ofxbecausestep-rendererismy-step-renderer, which acceptsfoo.Beta Was this translation helpful? Give feedback.
All reactions