← Back to team overview

ubuntu-phone team mailing list archive

Re: Ubuntu Phone Calculator Demo #1

 

On 23 February 2013 22:05, Octavian Damiean <odamiean@xxxxxxxxx> wrote:
>
> Very impressive! I especially like the swipe up for extended functions.

Agreed.

> So far I have only one concern. If you enter an incomplete expression,
> because you are in the middle of writing it, the expression gets
> auto-evaluated as a syntactically incorrect expression.

Agreed.

> The only obvious fix I can think off right now is not to have it evaluate
> the expression as you enter it. This might break the design goals though.

No, I think the right fix (although I'm not on the Calculator team) is
to keep it evaluating as you type, but *if* the expression results in
a syntax error *don't* show that (instead, a blank or the last result)
*unless* another key has been pressed.

i.e.

    Typed                      | Display
  -----------------------------+-----------
    4                          | 4
    4 +                        | 4
    4 + 2                      | 6
    4 + 20                     | 24
    4 + 20 -                   | 24
    4 + 20 - /                 | syntax error
    4 + 20 - / bksp            | 24
    4 + 20 - / bksp 6          | 18

Hopefully that makes sense.

Cheers,

Andrew

-- 
Andrew Flegg -- mailto:andrew@xxxxxxxx  |  http://www.bleb.org/


References