While we are very busy working on the next Smart release (2.0, scheduled for November), some parts of the new version are already completed. As we can’t release an alpha or beta version now (it’s just not there yet), I decided to write few short posts as new features reach maturity. The first part of Smart I’d like to talk about is the redesigned ‘Run’ experience.
In the Smart v1, results of Run depended on few options that were partly set in the Preferences and partly in the Options. The result was a bit confusing so we decided to clean the interface and improve the experience. In the v2 release, the only option to be set in the Preferences is the server port. Everything else is configured in the project Options.
Following execution targets are supported: internal browser (Chromium, built into Smart), default browser, custom browser (you can specify the command line). The latter two can be served from the file system (if “Use built-in server to run application” is not checked) or from the internal server. If the internal browser or server are used, the browser/server window is displayed.
The Browser tab displays the running program (just as in v1) using the built-in Chromium. The Source code tab displays the compiled program. The Server tab displays the QR code which you can use to quickly open the program in a mobile device.
You can also click the “Open in browser” button to open the program in the system default browser and the photo icon on the right to create a snapshot of the internal browser window.
The last trick we have added is that you can set up your program to be automatically reloaded when it is recompiled. Just go to the project Options and check “Automatically refresh in browser”.
If you now run the program (in any browser type), change the program and recompile, it will be automatically reloaded in the browser.