Math Field

Being annoyed with having to constantly open and close Fireworks’ modal Numeric Transform dialog, I thought it would be particularly useful in design applications to scale and reposition objects based on relative calculations like “this box should be 25 percent taller”.

Assuming this had been implemented somehow, I found the current method available in Mac applications described by Dave Mark, who learned of it from Mike Ash. The process is as follows:

  1. Enter a formula in a text field such as 10/2.
  2. Select the formula.
  3. Press Shift-Command-8.

Easy enough, but totally invisible unless you know it’s there (not necessarily a bad thing) and yet another keyboard shortcut to remember. The fact that Script Editor pops open is also mildly surprising and irritating.

Proposed Improvements

Keeping the existing method (though not requiring Script Editor to perform the calculations) is fine for free-form text, but a design specific to number boxes would be very helpful in many applications. It reduces input repetition (a starting value is always available), application switching, and would be a great help to me as I have trouble doing math in my head. As Dan Saffer stated in his Designing Smart and Clever Applications presentation: “Do what humans have trouble doing but computers can do easily.”

  1. Giving focus to a number input field displays a calculator pop-out.

    Pop-out calculator

  2. As the user inputs a formula using the keyboard or pop-out, it is written into the field. This provides a hint to the user that they can type in formulas directly.

    Formula input by pop-out calculator

  3. The formula is executed when the user clicks the Equals button, presses the Equals or Return or Enter key, or moves focus away from the field. The pop-out calculator disappears whenever focus moves away from the field. In the image below, Enter was pressed, moving focus back to the object in the document window.

    Pop-out calculator formula executed

Published by

Daniel J. Wilson

I am a designer, drummer, and photographer in Brooklyn, NY.

One thought on “Math Field”

  1. The reason Script Editor pops open is that you are actually executing an applescript when you press ⌘⇧8. That’s the shortcut to “Get result of AppleScript” in your services menu. Applescript understands math equations, and when it runs them as a script the appropriate number pops out and, because the service replaces your selection with the result, that’s what is inserted into whatever you’re typing. It’s a handy trick that I don’t take advantage of enough myself.

Comments are closed.