This post has been republished via RSS; it originally appeared at: Small Basic Blog articles.
Today, I'd like to introduce current status of Small Basic Online. At first, I will introduce fixed issues this year. Second, I'll tell what is the difference between Small Basic Online (SBO) and Small Basic Desktop (SBD). At last, I will show some ideas to write in SBO.
Fixed issues 2020 in SBO
Following issues have been fixed this year. SBO issues are managed in GitHub.
- #152 Array index is not case insensitive.
- #150 Array entry never removed
- #134 Level 2 Tutorial Should Work (same as #106 and #112)
- #133 Level 1 Tutorial should work
- #129 Some of spaces will be lost in text literals
- #127 Page does not load on Mac+Safari
- #126 Default of FontBold is "False"
- #122 TextWindow.ReadNumber Doesn't allow negative or decimal numbers
- #121 Text.Append does not append all printable character strings
- #112 GraphicsWindow.KeyDown event never be called
- #107 Turtle appears not on the trailing line on Chrome & Edge browsers
- #106 GraphicsWindow.LastKey always return null
- #58 GraphicsWindow.DrawImage doesn't show the image
- #14 Turtle graphic missing on Edge browser
Changes in SBO
There are many changes in SBO from SBD. SBO is still beta. So, some may be fixed but some will remain as the difference.
- Most important point is SBO allows us to program with only browser such as Edge and Chrome. This means SBO runs in not only Windows but other operating systems.
- 11 new features (Libraries Pane, Debug Mode, Updated Sample Program, New Icon Designs, Advanced Error Handling, Auto Filling, Hover Hints, Save & Open, TXT File Format, Open Source on GitHub, Double Display) are described in Ed's "NEW UPDATES: Small Basic Website 2.2 & Small Basic Online 1.0".
- Error messages are detailed in here.
- Shortcuts for keyboard are detailed in here.
Extensions cannot be used
Extensions such as Kinect for Small Basic and LitDev cannot be used.
Initial value of variable
The initial value of the variable is "". But reference to the variable without initializing causes compile error in SBD, while no error in SBO.
In SBD, Not = "False = True; True = False;" could initialize the array Not, but in SBO, the variable Not simply contains the above string.
Specifying transparent color
In Small Basic v1.2, the alpha value for opacity was specified as "#aarrggbb", but in SBO v1.0 it becomes "#rrggbbaa".
Features not implemented
The following functions cannot be implemented in SBO (online). Writing in code will result in a syntax error of The library member'ObjXXX.MbrXXX' cannot be used in the online editor. Please download the desktop editor to use it..
The following features are not yet implemented in SBO v1.0. I can't press the button.
The following features are not yet implemented in SBO v1.0. Writing in code results in a syntax error of The library member'ObjXXX.MbrXXX' was available in older versions only, and has not been made available to this version yet..
SBO has only Arial (Helvetica), Consolas, Courier New (Courier), Roboto and Times New Roman (Times). Details are described here.
Read-only GraphicsWindow size
The following properties are now read-only in SBO v1.0. Attempting to assign a value results in a syntax error Property'ObjXXX.PrpXXX' cannot be assigned to. It is ready only..
When I made a square with Shapes.AddRectangle (100, 100), it was 100 x 100 pixels in size, including the thickness of the pen. On the other hand, when it was made with GraphicsWindow.DrawRectangle (10, 10, 100, 100), it was larger by the thickness of the pen. In SBO, the latter is unified, and if the pen thickness is 2 pixels, both will draw a square of 102 x 102 pixels.
The design of the turtle has changed. Especially the size has increased.
The turtle trails are the same as Shapes in SBD, and the one created later was displayed in the foreground, but in SBO, the turtle trails are always in front of Shapes.
New programming style
Based on the above changes, I would like to explain the points about programming in the new Small Basic.
Make your own title
Neither GraphicsWindow.Title nor TextWindow.Title can be changed, so if you want to display the title, use Shapes.AddText, TextWindow.WriteLine, etc. to display it in the window.
Sample program XMC184-3 below has own title.
Ingenuity that does not depend on window size
There is a concept of responsive design so that the homepage can support devices of various sizes. Since SBO cannot specify GraphicsWindow.Width or GraphicsWindow.Height and is affected by the window size of the browser, it is a good idea to adopt the idea of responsive design. Specifically, it monitors GraphicsWindow.Width and GraphicsWindow.Height so that it will be repositioned on the screen when it changes.
Following program CVF012 will run in both SBO and SBD.
This time, as far as I know, I wrote about the changes in SBO and new programming styles based on it, but I will continue testing SBO and write a lot of programs for SBO from now on, so I will update this article as needed. Thanks.