intel / webapps-scientific-calculator

Apache License 2.0
27 stars 33 forks source link

Fixes issue #17: the calculation is wrong after I press clear (AC) #20

Closed HageMaster3108 closed 10 years ago

davidmaxwaterman commented 10 years ago

Thanks, looks good.

I've been testing it, and found some other issues and I wonder if you encountered them too. Mine were in intel-appframework - I had a quick look, but just replacing it with jquery fixed it, so I didn't look any further. The symptom was essentially, when I pressed '1', 'x' (for example), I got '1undefined'. I fixed it by changing calc.js:120, from :

if (operator===null) {

to :

if (!operator) {

Did you not experience this error?

It seems to work now, so I'm considering merging your PR, and adding mine after. What do you think?

HageMaster3108 commented 10 years ago

No, didn't experience the issue you have described.

davidmaxwaterman commented 10 years ago

Thanks. I'm still a little curious what is 'broken' with my setup - I did a completely fresh setup, so I think other people are more likely to experience the same issues as I have.

Would you mind giving me the output of :

$ bower list

and anything else you can think of that might be to blame.

Which grunt target are you testing, btw? I'm testing crx_unpacked, and just loading the build/crx/ directory as an unpacked extension in chrome (Version 37.0.2062.20 beta (64-bit) on ubuntu 14.04).

Max. [1] FYI, mine is currently :

[webapps-scientific-calculator]$ bower list
bower check-new     Checking for new versions of the project dependencies..
webapps-scientific-calculator#0.0.2
/home/davidmaxwaterman/z/webapps-scientific-calculator
├── iscroll#5.0.9 (latest is 5.1.2)
├── jquery#2.1.1
├── open-sans
├── open-sans-light
├── open-sans-semibold
├── peg-0.7.0.min#e-tag:c07097448
└── q#0.9.7 (latest is 2.0.0)

On 23 July 2014 22:42, HageMaster3108 notifications@github.com wrote:

No, didn't experience the issue you have described.

— Reply to this email directly or view it on GitHub https://github.com/01org/webapps-scientific-calculator/pull/20#issuecomment-49940333 .

HageMaster3108 commented 10 years ago

FYI: When I forked this project recently (to build the pull request #20 to solve #17), I did a completely new setup too.

My bower list looks like this

bower check-new     Checking for new versions of the project dependencies..
webapps-scientific-calculator#0.0.2 /Users/patrick/Dev/evocube/web/webapps-scientific-calculator
├── intel-appframework#2.1.0
├── iscroll#5.0.9 (latest is 5.1.2)
├── open-sans
├── open-sans-light
├── open-sans-semibold
├── peg-0.7.0.min#e-tag:c07097448
└── q#0.9.7 (latest is 2.0.0)

So somehow mine is missing jquery but has intel-appframework?

HageMaster3108 commented 10 years ago

And on grunt target: I'm using "grunt server" to load the calculator from http://localhost:30303/. Have not worked with any of the dist targets yet.

davidmaxwaterman commented 10 years ago

The jquery/appframework anomoly is my fault because I replaced the latter with the former. That's the latest on master.

Oh, you're using an web server. Hrm, that might be a big difference, I think...chrome can be a bit picky when it comes to packaged apps. Just trying that...hrm, I see the same problem (with 9+ displaying '9+9+'). I'm wondering if I need to erase some localstorage or something....trying that...nope, the same...and I tried deleting the session storage too.

Well, if you've merged the latest commits from the upstream repository, and it works for you, then I guess it must be something to do with my environment and I'll just ignore it.

What do you think?

Max.

On 24 July 2014 13:21, HageMaster3108 notifications@github.com wrote:

And on grunt target: I'm using "grunt server" to load the calculator from http://localhost:30303/. Have not worked with any of the dist targets yet.

— Reply to this email directly or view it on GitHub https://github.com/01org/webapps-scientific-calculator/pull/20#issuecomment-50001306 .

HageMaster3108 commented 10 years ago

Well, not that I have a clue why it behaves differently on your machine or on how to approach the problem but my gut feeling says that it could also go wrong for other users?;)

HageMaster3108 commented 10 years ago

Wow that is weird, whenever I launch the editor it behaves differently? I have now re-launched "grunt server" three times:

HageMaster3108 commented 10 years ago

Oh sh\ I found that my pull request was responsible for part of the problems :-( See #22 My local installation was only workig because for some reason build/app didn't get re-generated when I relaunched the server.

Sorry, my bad.

davidmaxwaterman commented 10 years ago

Yeah, that works for me too :D Glad we caught that. Thanks for the effort!