GNOME Bugzilla – Bug 108219
numeric base isn't reset in normal/finanical mode
Last modified: 2004-12-22 21:47:04 UTC
Step to reproduce: Select scientific mode. Select bin. Go back to normal mode. Exprected result: Behave like a normal calculator using decimal numbers Actual result: Keeps "unnormal" binary numbers. Rationale: I think the Normal mode should be fool proof. The user doesn't expect that the binary setting that is only visible in Scientific mode is just hidden. It is a special function of scientific mode and not availible in other modes (and thus not show). Furthermore i think it is bad to have the used number base as a semi-hidden state (Binary can be deduced from the disabled digits 2-9, but Hex can not). This also applies to hex octal and to the financial mode.
You raise a very good point. I've cc:'ed Calum Benson, one of the GNOME HCI engineers for his take on this. Calum, as a datapoint, the Windows calculator resets to Decimal when you go from the Scientific mode to the Normal mode. The other thing here perhaps is if the user has set "Sci" or "Eng" in Scientific mode. They should be adjusted back to "Fix" if you then move to Basic or Financial mode.
Yeah, I it might well make sense to always use decimal in basic and financial modes. When you switch back to scientific mode it should remember whatever settings you were using last time you used scientific mode. The question then would be what to do when you switched from scientific to basic mode with some non-decimal value on display; convert it probably, rather than zero-ing the display. If there's some reason not to do this, we probably need to re-instate an indicator area somewhere in the display that shows your current angle/base settings regarldess of which mode you're in, and/or just keep the radio and checkbuttons that let you choose them on display all the time. (But that would surely complicate the Basic mode more than necessary).
Calum and I talked this over on IRC this morning. We've come up with the following (Calum, correct me if I state this incorrectly please): * When you go from Scientific mode to either Basic or Financial mode, the calculator will revert to "Dec" base in "Fix" notation. * Any number in the display (and the memory registers if shown) will be converted accordingly. * When you are in a mode (Basic, Financial, or Scientific) you will only be able to do the functionality that that mode shows. For example, you will not be able to do base changes if you are in Basic or Financial mode. As it currently stands, you can (with the keyboard shortcuts), do any function, in any mode. The proposed solution is actually the way that the old calctool application used to work (where the Financial, Logical and Scientifical modes were provided by a separate popup window).
This seems to be the correct behvior to me. (You could keep the binding of none mode switching functions active, but i don't have a strong opinion on that)
Fixed (as described above) in v4.2.70 of gcalctool.
Hi Rich, Sorry, but I found a problem in 4.2.70. Steps to reproduce the problem: 1. start gcalctool 2. select View->Scientific Mode. 3. select 'Oct' base & 'Sci' display type. 4. type '10' & press <enter> (display shows: 1.000e+1) 5. select View->Basic Mode. (display shows: 8.0000) 6. select View->Scientific Mode. (display shows: 8.0000) Actual Results: According to the calculator, the selected base is 'Oct' & the selected display type is 'Sci', but the display value is neither. It is 8.0000 which has a base of 'Dec' and a display type of 'Fix'.
Hi Dennis. No need to apologise for finding bugs, even when I've supposedly fixed 'em! The problem here was I'd fixed the internal state when going from Scientific mode to Basic or Financial mode, but I hadn't set the radio buttons in the mode panel. Now (hopefully) fixed in v4.2.72. Thanks!