Opened 14 years ago

Closed 12 years ago

#2307 closed defect (fixed)

Calculate: Help text should not be copied as an answer for the next calculation

Reported by: greenfeld Owned by: garycmartin
Priority: Unspecified by Maintainer Milestone: Unspecified
Component: Calculate Version: 0.84.x
Severity: Unspecified Keywords: easy-hack
Cc: Distribution/OS: OLPC
Bug Status: Unconfirmed

Description (last modified by greenfeld)

Seen on: OLPC 10.1.2 build 852/Sugar 0.84.16, as well as Fedora 12/Sugar 0.86.3

If a user does an action which implies to the calculator that it should use the previous result as the first value (such as the "-" sign for a negative number), help text should not be copied as a "result" for this purpose.

Reproduction:

  1. Start the Calculate activity.
  2. Type "help(y)" and press Enter. You should see that "No help about 'y' {is} available" for a "result".
  3. Press any operand key (+, *, -, etc.)

Expected Action: The GUI should be smart enough to know that "No help about 'y' {is} available" is not a number or other valid calculation result, so it should not try to run a calculation with that unless we are going to support string operations on such strings.

Actual Action: The help text is copied to the entry line and then the operand is appended, which makes no sense for calculation purposes.

Change History (4)

comment:1 Changed 14 years ago by greenfeld

  • Description modified (diff)

comment:2 Changed 12 years ago by godiard

  • Keywords easy-hack added

comment:3 Changed 12 years ago by garycmartin

  • Owner changed from rwh to garycmartin
  • Status changed from new to assigned

comment:4 Changed 12 years ago by garycmartin

  • Resolution set to fixed
  • Status changed from assigned to closed

Fixed with in mainline with below commit, will be in Calculate-39 release:

http://git.sugarlabs.org/calculate/mainline/commit/a5bb954d46835869052fde18509cabba90cb4a23

Note: See TracTickets for help on using tickets.