The
SpreadSheetPlugin currently uses the
commonTagsHandler
to handle the CALC variable, not the
registerTagHandler
. This is needed because registered tags cannot access topic content surrounding the CALC, which is needed for spreadsheet calculations in tables. As a disadvantage, the CALC variable is evaluated after other variables, e.g. not inside-out & left-to-right like other variables that use the register tag handler.
This enhancement adds a new CALCULATE variable that uses the
registerTagHandler
. This ensures that the variable is evaluated inside-out & left-to-right like regular variables. As a disadvantage, the CALCULATE variable cannot handle functions that refer to table cells, such as
$LEFT()
or
$T()
.
At a later point when the TWiki API for tag handlers supplies the text preceding and following the tag, the CALCULATE variable can be enhanced to support also functions that refer to table cells. At that time, the CALC variable can be deprecated.
--
TWiki:Main/PeterThoeny
- 2012-04-05
This is now in SVN trunk and 5.1 branch.
--
TWiki:Main/PeterThoeny
- 2012-04-05