After publishing your program to Small Basic listing server, you may find problems in your program running in your browser with Silverlight. A TechNet Wiki article "Small Basic: Difference between Local and Remote" shows the difference of behavior when the Small Basic running under desktop and under internet browsers. In this article, you can find details of issues including workaround.
In this article, there are 34 difference between local (desktop) and remote (browser). So, please check this list first when your program has strange behavior in a browser.
In my case, I wrote a simple Paint program MQB393 as a challenge for Challenge of the Month - October 2014. But this program doesn't work properly in remote. I used GraphicsWindow.GetPixel() operation and GraphicsWIndow.MouseX and GraphicsWindow.MouseY properties in this program. But these operation and properties have some issues. In this program, following two issues were the problems.
- GraphicsWindow.GetPixel(x, y) doesn’t work properly if x or y has after decimal point in remote.
- GraphicsWindow.MouseX and GraphicsWindow.MouseY don’t return integer in remote.
GraphicsWindow.MouseX and GraphicsWindow.MouseY returns such like (200.5, 100.3). And GraphicsWindow.GetPixel(200.5, 100.3) returns a color from a different co-ordinate. So selecting color from color wheel picks wrong color (in many case it becomes black).
So, to avoid this issue, I added Math.Round() for both GraphicsWIndow.MouseX and GraphicsWindow.MouseY. The updated program MQB393-0 works well even in browsers. And I wrote an article about details of this issue as "Small Basic Known Issue: 26992 - GraphicsWindow.GetPixel(X, Y) Doesn’t Work Properly If X Or Y Has after the Decimal Point in Remote".
I added unique numbers for known issues such like 26992 above. This number is from TechNet Wiki article number because it's unique.
By the way, I am a little worried by words local and remote. I defined in the known issues articles that in local means in desktop Small Basic program complied by the IDE. And in remote means in Small Basic listing server displayed with a browser which has Silverlight plug-in. But the browser with Silverlight is a desktop program which runs in a local PC.
If you find good words to represent these difference of environments, please let me know.
And also if you find new difference between local and remote, please let me know or add the issue into the list.
Thanks.