balitaJackson / flashcanvas

Automatically exported from code.google.com/p/flashcanvas
0 stars 0 forks source link

measureText() throws an Exception when argument is not a string (integer or float) #22

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. var myCanvas = document.createElement('canvas');
2. document.body.appendChild(myCanvas);
2. FlashCanvas.initElement(myCanvas);
3. var ctx = myCanvas.getContext('2d');
4. ctx.measureText(42); // Exception thrown
5. ctx.measureText('42'); // OK

What is the expected output? What do you see instead?
Expected output: {"width": 12}
Result: Exception thrown

What version of the product are you using? On what operating system?
FlashCanvas 1.5 on IE8, Windows 7 32bit

Please provide any additional information below.
measureText() should always convert it's argument to a string to avoid these 
situations

Original issue reported on code.google.com by josep.sa...@gmail.com on 17 Oct 2012 at 1:07

GoogleCodeExporter commented 8 years ago
Small correction: the version I was using is FlashCanvas-20110201 and not 
FlashCanvas 1.5. I thought I should clarify, just in case.

Original comment by josep.sa...@gmail.com on 17 Oct 2012 at 1:15

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r223.

Original comment by revu...@gmail.com on 18 Oct 2012 at 5:13