In ESBPCS for VCL we had a Calculator Engine that was “encapsulated” in a TESBCalculator Component – we also had a unit that used the Calculator Engine to parse Expressions – and then we encapsulated the more sophisticated Expression Parser into a component as well.
For ESBDevLib, one of the advantages of doing a redesign is being able to examine what has gone before and saying “How can we do this better?”.
First – whilst we haven’t decide on precise “package” make up at this stage, we are not looking at separate “Calcs“, “Dates” and “Stats” as in ESBPCS for VCL. Whilst this worked out reasonably well, in recent years there was a lot of “working around” things so that the components and routines ended up in the correct packages. So currently we are considering – ESBDevLib for VCL, ESBDevLib for FMX and ESBDevLib for VCL/FMX – with the latter being the “Full Version” – and ESBDevLib for .Net being a separate package that we will give a discount on if any ESBDevLib For VCL/FMX customers want it.
So we can allow access to the Calculator Engine at all levels – and thus it makes sense to integrate the Expression Evaluation into the Calculator Engine, and similarly the non-visual component for the Calculator includes not only a “default” pop-up Calculator but also Expression Evaluation. Currently we’ve only done the VCL version of TEDLCalculator – but there will be an FMX one as well. Once we are fully happy with the new Calculator Component we will break it out a “base” version as a parent that doesn’t use VCL so that the VCL and FMX versions can nicely descend from it.
Our new Calculator Edits – which are descended from our Float Edits – include both the ability to evaluate an Expression and to call a popup calculator once a Calculator Component is attached. So this removes the need for the Expression Edits that were in ESBPCS for VCL. Also Calculator Edits no longer have a button by default – since in recent years we had added “Hide Button” property to ESBPCS Calculator Edits for people (like ourselves) who were using them with buttons from 3rd Party Companies like TMS and LMD. We will have a buttoned version for those who do like that approach but it will be a descendant 🙂
We still have work to do on the Scientific Popup Calculator and the Programmer’s Calculator has a decent “to do” list attached to it – but things are progressing nicely 🙂