Small Basic: Difference Between Local and Remote

I'd like to introduce known issues about behavior difference between local (Small Basic IDE) and remote (smallbasic.com with Silverlight) run time environment in this article.


Screen shot of a Small Basic program in local ([Run] from Small Basic IDE)


Screen shot of a Small Basic program in remote (smallbasic.com/program/?XXX999 in a web browser with Silverlight plug-in)

Known Issues

  1. Object Dictionary doesn't work in the remote.
  2. Controls.GetTextBoxText() returns CR+LF as newline for multi-line text box in local but CR in remote. (detail)
  3. Default GraphicsWindow.BackgroundColor is "#FFFFFF" in local but "#FFFFFFFF" in remote.
  4. Default GraphicsWindow.BrushColor is "#6A5ACD" in local but "#FF88AACC" in remote.
  5. Default GraphicsWindow.CanResize is "True" in local but "False" in a remote.
  6. GraphicsWindow.DrawEllipse() and GraphicsWindow.DrawRectangle() are GraphicsWindow.PenWidth smaller than original in remote. (detail)
  7. Default GraphicsWindow.FontName is "Tahoma" in local but "Segoe UI" in remote.
  8. Setting to GraphicsWindow.FontName, GraphicsWindow.FontSize or GraphicsWindow.PenWidth sometimes happen before previous drawing statements in remote. (detail)
  9. GraphicsWindow.GetPixel() returns "#rrggbb"in local but “#FFrrggbb” in remote. (detail)
  10. GraphicsWindow.GetPixel() causes program hang after GraphicsWindow.DrawImage() in remote.
  11. GraphicsWindow.GetPixel(x, y) doesn’t work properly if x or y has after the decimal point in the remote. (detail)
  12. Default GraphicsWindow. Height is 443 in local but 480 in remote. (detail)
  13. The input focuses for GraphicsWindow.KeyDown and GraphicsWindow.KeyUp event handlers can be lost when there is a text box control in local but the input focus can be rounded among controls including key event handlers by pushing tab key in remote.
  14. GraphicsWindow.LastKey becomes "LeftShift" or "RightShift" for [Shift] key in local but "Shift" in remote.
  15. GraphicsWindow.LastText returns as same key name as GraphicsWindow.LastKey in remote.
  16. GraphicsWindow.MouseX and GraphicsWindow.MouseY don’t return integer in remote.
  17. Default GraphicsWindow.PenColor is "#000000" in local but "#FF000000" in remote.
  18. Viewport of GraphicsWindow is narrower and sometimes resized in remote. (detail)
  19. Default GraphicsWindow. Width is 624 in local but 640 in remote. (detail)
  20. Strings including HTML tags and character references are broken in program listing in remote.
  21. ImageList.GetHeightOfImage() and ImageList.GetWidthOfImage() return zeros in remote.
  22. Network.GetWebPageContents() doesn't work in remote.
  23. Program.ArgumentCount and Program.GetArgument() cause error in remote.
  24. Program.Delay() is needed in loop in remote.
  25. Shapes.Move() position base for zoomed triangle is different in remote. (detail)
  26. Shapes.Rotate() rotates triangle and line at center in local but at corner in remote. (detail)
  27. Shapes.Zoom() zooms image at center in local but at corner in remote. (detail)
  28. Shapes.Zoom() with scale 0.7 or smaller of an image that has transparent pixels causes run time error in local but not in remote. (detail)
  29. Sound.PlayMusic() and Sound.Play() do nothing in remote.
  30. Sound.PlayXXXAndWait() doesn't wait in remote. (detail)
  31. Invalid color for TextWindow.BackgroundColor is ignored in local but becomes black in remote.
  32. TextWindow.CursorLeft and TextWindow.CursorTop can’t be set in remote.
  33. TextWindow.ForegroundColor can't be set in remote.
  34. Short Timer.Interval (such as 20) is too heavy in remote.
  35. Turtle operations written in event handlers cause program hang up in remote. (detail)
  36. Colors "#rgb" such like "#960" are accepted in local but become black in remote.

Specific Difference

And following facts must be specification.

  • Line with File object statement will be commented out in remote.
  • Extension doesn't work in remote.
  • Before using key input with GraphicsWindow.LastKey, you need to click the program screen in remote.
  • GraphicsWindow.Left and GraphicsWindow.Top are always zero in remote.
  • Sound of Sound.PlayClick() is different between local and remote.
  • Mouse.IsRightButtonDown is always "False" because of Silverlight popup.
  • Program.Directory returns URL of published program in remote.

See Also