Page 1 of 1

Sample CalculatorApp not working in browser

Posted: Sun Jan 31, 2016 1:21 pm
by fanoI
I've downloaded the version 7 and I have noticed that sadly the Calculator application while run in the Simulator does not runs correctly in the browser I get an exception regarding GetHashCode() when an operation is done.

I'd say is really bad publicity with the samples does not work.

P.S. same problem is present with the previous beta.

Re: Sample CalculatorApp not working in browser

Posted: Mon Feb 01, 2016 9:50 am
by JS-Support @Userware
(Updated: Feb 1, 2016)

Hi and welcome to the forums,

Sorry for the inconvenience.

This is a known JSIL issue under VS 2015 when using a switch statement on a string variable:
https://github.com/sq/JSIL/issues/922

We expect it to be fixed very soon.

In the meantime, if you are using VS 2015, please replace the switch statement with a series of "if" and "else if".

The "Sample Showcase" project should also work fine. Please let me know if it does not.

I will let you know as soon as it is fixed.

Thank you.

Regards,
JS-Support

Re: Sample CalculatorApp not working in browser

Posted: Mon Feb 01, 2016 3:07 pm
by fanoI
Thank you for your response. Yes doing if / else if / else if it seems to work correctly.

There is another issue that I fear is linked with the JS double type in C# the operation 0.2*3 gives correctly 0.6 while in java script it returns 0.6000000000000001 :shock:

As I need to do currency calculations in future there will be decimal / currency support?
There is already a decimal class in js that emulates the C# one:

https://www.npmjs.com/package/jsdecimal.