jsCalc is an inline calculator: it reads a mathematical expression directly from a field or variable on-screen, evaluates it, and pastes the result back into the field. No searching the desktop (real or virtual) for a hand calculator, no remembering and mistyping numbers: No trouble.
jsCalc is an end-user feature, to make your database easier to use and your customers happier. It's a (minor) selling point: your competitors' products cannot do this.
Here's it works, from the user's perspective (imagine that this is a field in your existing input form). She types the expression to be evaluated directly into the stream of text where the result belongs, then selects the expression.
She clicks on a button marked Calculate (or selects a menu command).
All that you the Developer need do, is to create one button in your existing input form(s) which calls the component's start method (and to give this a tool tip describing what it does). That's it, you've already finished. jsCalc does everything else itself!
A second possibility is to integrate jsCalc into your application using the Developer Hook feature. This allows you to send the expression string through a pointer to a field or variable, which then receives the result. This lets you provide the functionality of jsCalc outside of input forms, e.g. in 4D Write areas.
jsCalc is distributed as a component, to be installed in your structure files using 4D Insider version 6.7 or higher. The Macintosh version is a Stuffit Expander archive, the Windows version is a ZIP archive. The User Guide (PDF) may be downloaded separately, for those who like to read the documentation first. It's also bundled with the components. Please read the section "Installing jsCalc" on page 4 before performing the installation!
The current release is 1.6, dated 15.01.2003. This fixes bugs in rounding-off and in the handling of nested parentheses, and a compiler problem.
Copyright © 2002, John Skinner. All rights reserved.
Last revised 2003.01.15